Re: [R] include sql statements

2014-03-03 Thread Streng Ge-heim
Thanks a lot. The hint with readLines worked :) Then I got it to work like this: sql <- paste(readLines(con = "stmnt.sql"), collapse = " ") result <- sqlQuery(db,sql) Michel 2014-03-02 17:52 GMT+01:00 Gabor Grothendieck : > On Fri, Feb 28, 2014 at 5:16 AM, St

[R] include sql statements

2014-02-28 Thread Streng Ge-heim
Hi, first of all: I am new to R. Anyway, I would like to include sql files in my r-script, which I load via source("scriptname") in the CLI. The sql files (i.e. "stmt.sql") contains select statements with joins, line breaks, various characters, they can be quite long. My question is, is there a