Skip to content

multi-line query

5 messages · jim holtman, Ben quant, Gabor Grothendieck

#
Why not just send it in as is.  I use SQLite (via sqldf) and here is
the way I write my SQL statements:

    inRange <- sqldf('
        select t.*
                , r.start
                , r.end
            from total t, commRange r
            where t.comm = r.comm and
                t.loc between r.start and r.end and
                t.loc != t.new
        ')
On Tue, Nov 8, 2011 at 11:43 AM, Ben quant <ccquant at gmail.com> wrote:

  
    
#
On Tue, Nov 8, 2011 at 11:43 AM, Ben quant <ccquant at gmail.com> wrote:
The gsub is not needed:

s <- "create table x (
   a real,
   b integer
)"
dbSendUpdate(con, s)
#
On Tue, Nov 8, 2011 at 1:04 PM, Ben quant <ccquant at gmail.com> wrote:
Assuming you have loaded RpgSQL and sqldf it works for me so there is
likely some configuration in your setup, either with RpgSQL or with
PostgreSQL itself.
[1] id  val
<0 rows> (or 0-length row.names)

If you are going to use your own create statements then you might be
better off using RpgSQL directly rather than sqldf.