[R] using variable in rmysql query

2010-11-07 Thread Mohan L
Dear All, I am using this query it returns id : id - dbGetQuery(con1,SELECT id FROM tenants WHERE name LIKE '%consim%') But In my case the string consim is there in another variable(it is coming from configuration file); str - consim I am trying to replace the string some this like, but it

Re: [R] using variable in rmysql query

2010-11-07 Thread jim holtman
?paste id - dbGetQuery(con1,paste(SELECT id FROM tenants WHERE name LIKE '%, ,str, %', sep = '')) On Sun, Nov 7, 2010 at 4:51 AM, Mohan L l.mohanphys...@gmail.com wrote: Dear All, I am using this query it returns id : id - dbGetQuery(con1,SELECT id FROM tenants WHERE name LIKE