Skip to content
Prev 12330 / 398502 Next

how to type long string

Guoqiang Wang <guo52717 at yahoo.com> writes:
You just can't do that... If SQL allows newlines in expressions, you
could do

h3 <- sqlQuery(myConnect, "select * from console where \
 byday = 'dd1' group by hour")

(Since
+ n"
[1] "a\nn"
)

Otherwise you need an explicit paste(), as in

querystr <- paste("select * from console where",
                  "byday = 'dd1' group by hour")
h3 <- sqlQuery(myConnect, querystr)