Re: [R] sql query variable

2010-02-18 Thread RagingJim
Thanks guys. I ended up doing as you suggested Dieter. Thanks for the idea :) -- View this message in context: http://n4.nabble.com/sql-query-variable-tp1558189p1561158.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] sql query variable

2010-02-17 Thread Bart Joosen
Another way: cat(Station number?) flush.console() sn - scan(quiet=TRUE,n=1) sqlQuery(conn, paste(select to_char(lsd,'-mm') as yr,ttl_mo_prcp from mo_rains where stn_num=,sn,sep=)) Bart -- View this message in context: http://n4.nabble.com/sql-query-variable-tp1558189p1558504.html Sent

[R] sql query variable

2010-02-16 Thread RagingJim
This is the very last thing I need to make everything work properly. My query: sqlQuery(conn, select to_char(lsd,'-mm') as yr,ttl_mo_prcp from mo_rains where stn_num=023000) Is there a way to may the stn_num in the query variable, ie make it so that whenever my script is run, the user must

Re: [R] sql query variable

2010-02-16 Thread Dieter Menne
RagingJim wrote: This is the very last thing I need to make everything work properly. My query: sqlQuery(conn, select to_char(lsd,'-mm') as yr,ttl_mo_prcp from mo_rains where stn_num=023000) Is there a way to may the stn_num in the query variable, ie make it so that whenever my