No, error message from your ODBC driver ...

Your table names are not valid SQL names. The details depend on the exact driver, but you could try omitting the final dollar. This may not work, in which case you may need to use an sqlQuery call.

On Mon, 5 Jan 2009, giovanni parrinello wrote:

channel <- odbcConnectExcel("nuova tabella terapia occupazionale mod.xls")
## list the spreadsheets
sqlTables(channel)
                                                       TABLE_CAT
TABLE_SCHEM                      TABLE_NAME
1 c:\\TABELLE DEFINITIVE\\nuova tabella terapia occupazionale mod
<NA>  'emi tot 2006 OAI_60g TO FU1$'
2 c:\\TABELLE DEFINITIVE\\nuova tabella terapia occupazionale mod
<NA>  'emi tot 2006 OAI_60g TO FU2$'
3 c:\\TABELLE DEFINITIVE\\nuova tabella terapia occupazionale mod
<NA> 'emi tot 2006 OAI_60GG divisi$'
4 c:\\TABELLE DEFINITIVE\\nuova tabella terapia occupazionale mod
<NA>                 'emi tot 2006$'
5 c:\\TABELLE DEFINITIVE\\nuova tabella terapia occupazionale mod
<NA>        'RMI E SCALA SPECIFICA$'
6 c:\\TABELLE DEFINITIVE\\nuova tabella terapia occupazionale mod
<NA>        'VALORI RANKIN RMI CSS$'
 TABLE_TYPE REMARKS
1      TABLE    <NA>
2      TABLE    <NA>
3      TABLE    <NA>
4      TABLE    <NA>
5      TABLE    <NA>
6      TABLE    <NA>
table1=sqlFetch(channel,"emi tot 2006 OAI_60g TO FU1$")
str(table1)
chr [1:2] "[RODBC] ERROR: Could not SQLExecDirect(?????)" ...
sqlTables(channel)

        [[alternative HTML version deleted]]


--
Brian D. Ripley,                  rip...@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to