[R-sig-DB] binding variable in sqlQuery

ggorj@@@34155694 m@iii@g oii biogii@es@com ggorj@@@34155694 m@iii@g oii biogii@es@com
Tue Dec 5 11:36:43 CET 2006


Try paste() i.e.

my_value = 10
library(RODBC)
inchannel <- odbcConnect("my_server",
uid="samay")
query <- paste("select item1, item2 from _my_table
       
    where item3 >= 10
            and dbid = ", my_value)

sqlQuery(inchannel,
query)




More information about the R-sig-DB mailing list