Re: [R] RODBC Error: 'getCharCE' must be called on a CHARSXP

2011-12-20 Thread Uwe Ligges
hin a string that is enclosed in double quotes. It is correctly passed to the SQL interface. Uwe ligges -Original Message- From: Uwe Ligges [mailto:lig...@statistik.tu-dortmund.de] Sent: Tuesday, December 20, 2011 8:46 AM To: Mike Pfeiff Cc: 'r-help@r-project.org' Subject: R

Re: [R] RODBC Error: 'getCharCE' must be called on a CHARSXP

2011-12-20 Thread Mike Pfeiff
e extra "\"' is improper SQL form. Maybe I should be asking what is the proper way to return "" inside of a char string? -Original Message- From: Uwe Ligges [mailto:lig...@statistik.tu-dortmund.de] Sent: Tuesday, December 20, 2011 8:46 AM To: Mike Pfeiff Cc: 

Re: [R] RODBC Error: 'getCharCE' must be called on a CHARSXP

2011-12-20 Thread Uwe Ligges
On 20.12.2011 14:55, Mike Pfeiff wrote: I am trying to connect to an internal database and use the sqlQuery command to reduce and retrieve data using the following code: channel<-odbcConnect("some_dsn", uid="", pwd="") txt<-'SELECT Date, Region, Price FROM TableXYZ WHERE Type="Domestic"' sqlQ

[R] RODBC Error: 'getCharCE' must be called on a CHARSXP

2011-12-20 Thread Mike Pfeiff
I am trying to connect to an internal database and use the sqlQuery command to reduce and retrieve data using the following code: channel <-odbcConnect("some_dsn", uid="", pwd="") txt<-'SELECT Date, Region, Price FROM TableXYZ WHERE Type="Domestic"' sqlQuery(channel, cat(txt,"\n"),errors=TRUE,) c