[R] SAS ODBC

From: Scillieri, John <John.Scillieri_at_constellation.com>
Date: Tue, 5 Feb 2008 16:07:20 -0500


All,

I'm trying to connect to a remote SAS server using SAS's 9.1 ODBC driver and the RODBC package. I'm running R-2.6.1 on Win XP. I can successfully connect to the database, but no matter which table I query, I get back an empty table with only the column headers. For example:

> sqlQuery(con, "select * from PRICES.DB_PRICES")

	[1] COMMOD_CURVE START_DATE   PRICING_DATE PRICE       
	<0 rows> (or 0-length row.names)

sqlTables also returns back an empty table:

> sqlTables(con)

	[1] TABLE_QUALIFIER TABLE_OWNER     TABLE_NAME      TABLE_TYPE
REMARKS        
	<0 rows> (or 0-length row.names)

And sqlFetch doesn't work either:

> sqlFetch(con, "PRICES.DB_PRICES")

	Error in odbcTableExists(channel, sqtable) : 
	  'PRICES.DB_PRICES': table not found on channel

Are their other options I should be using with RODBC to pull the data? I have tested the connection in MS Access and can successfully display data (using File->Get External Data...->ODBC->...)

Any suggestions would be great, thanks in advance for your help.

John Scillieri
>>> This e-mail and any attachments are confidential, may contain legal, professional or other privileged information, and are intended solely for the addressee. If you are not the intended recipient, do not use the information in this e-mail in any way, delete this e-mail and notify the sender. CEG-IP2



R-help_at_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. Received on Tue 05 Feb 2008 - 21:10:16 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 05 Feb 2008 - 22:30:11 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive