[R] [R-sig-DB] RODBC on Oracle DB

Marc Schwartz marc_schwartz at comcast.net
Wed Jul 18 14:23:59 CEST 2007

On Wed, 2007-07-18 at 08:04 +0100, Prof Brian Ripley wrote:
> On Tue, 17 Jul 2007, Marc Schwartz wrote:
> > Try the sqlQuery() syntax with a semi-colon at the end of it:
> >
> >  sqlQuery(essai, "select * from S_TYP_COLLEGES;")
> >
> > Oracle requires the semi-colon at the end of the SQL statement.
> Over ODBC?  I've never heard of that, and others have used RODBC to 
> Oracle successfully when it does not itself add semicolons.  What sqlFetch 
> is running is (in a vanilla setup) "SELECT * FROM 'S_TYP_COLLEGES'", and 
> we've heard of a few cases where the quotes were a problem, hence my 
> suggestion.
> The error message is not a syntax error (which is what I would expect 
> from a missing terminator), but that the table/view is not found.

I stand corrected. 

I was going from memory pertaining to some prior errors that I had when
setting up my unixODBC/RODBC connection on Fedora to our Oracle server.
Adding the semi-colon to the query string seemed to have helped to
resolve at least part of the issue, but perhaps it was merely a

I just tried it here from home over our VPN and the queries worked with
and without the semi-colon.

Thanks for pointing that out.



More information about the R-help mailing list