[R] Using text put into a dialog box

RagingJim nowa0021 at flinders.edu.au
Wed Feb 17 01:30:34 CET 2010


Thanks Greg, the problem is I have no idea how to return and use what I have
typed into the pop up. Add to that the complication that with this query 

x<-sqlQuery(conn, "select to_char(lsd,'yyyy-mm') as yr,ttl_mo_prcp from
mo_rains where stn_num=23090")

if I put anything other than a number into stn_num=... then it does not run.
eg if I just do sn=23090 and then use that in the query

sqlQuery(conn, "select to_char(lsd,'yyyy-mm') as yr,ttl_mo_prcp from
mo_rains where stn_num=sn")

I get the following error.

[1] "[RODBC] ERROR: Could not SQLExecDirect"                              
[2] "42S22 904 [Oracle][ODBC][Ora]ORA-00904: \"SN\": invalid identifier\n"

So my question is in two parts. Firstly, how do I return the number written
in the popup, and then secondly how do I actually put it into the query? 

Thanks again
-- 
View this message in context: http://n4.nabble.com/Using-text-put-into-a-dialog-box-tp1555761p1558124.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list