pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marvelde, Luc te <L.teMarvelde@nioo.knaw.nl>
To: pgsql-sql@postgresql.org
Cc: Marvelde, Luc te <L.teMarvelde@nioo.knaw.nl>
Subject: Sqldf - error message
Date: Fri, 20 Nov 2009 15:18:33 +0100
Message-ID: <1276C0564833F043AB4C85ED8DA9CFE502AF054F@ctemail1.nioo.int> (raw)

Hi All!

I just discovered sqldf and im very enthousiastic, as I am a big fan of
R and I often get frustrated using Access for datamanagement.

I tried running some queries from Access in R, and it works very well.
However, I have problems with some queries.

If I run this SQL query:

> sqldf("SELECT
+ dbo_tbl_Terrein.RingCentraleNaam,
+ dbo_tbl_Broedsels.BroedselID
+ FROM ((dbo_tbl_BroedselLocatie
+ INNER JOIN dbo_tbl_Broedsels ON dbo_tbl_BroedselLocatie.BroedselID =
dbo_tbl_Broedsels.BroedselID)
+ INNER JOIN dbo_tbl_Nestkasten ON dbo_tbl_BroedselLocatie.NestkastID =
dbo_tbl_Nestkasten.NestkastID)
+ INNER JOIN dbo_tbl_Terrein ON dbo_tbl_Nestkasten.TerreinNummer =
dbo_tbl_Terrein.TerreinNummer
+ WHERE (((dbo_tbl_Terrein.RingCentraleNaam)='Oosterhout a/d Waal'));")

I get the following message:

Error in sqliteExecStatement(con, statement, bind.data) : 
  RS-DBI driver: (error in statement: no such column:
dbo_tbl_Broedsels.BroedselID)

( I also tried removing the 'dbo_tbl_'  part of the dataframe names, but
still the same problem occurred)



Now ofcoarse I looked on google, because I was sure someone would have
had the same problem.. And yes, I found this website...

http://code.google.com/p/sqldf/


They say: 
This happens when you try to use variable with a dot in it (as dots have
special meaning to SQL) or if you try to use SQL92 reserved keywords.
SQLite/RSQLite replaces dots with underscores and changes keywords words
so that they can be used. The keywords in question can be found by
entering the following at the R command line: 
.SQL92Keywords

In this list of keywords, i cannot find any word that is close to the
error... So, i was wondering if someone knows how to solve it.
preferably i do not want to change all variable names, as these names
come from the 'big main database' of the institute.


The site also says that SQLite/RSQLite can fix the problem... but then
when i look in their help, i cannot see how i can easily use those
commands...

Anyone?


Kind regards,

Luc te Marvelde
New member :)

view thread (9+ messages)  latest in thread

Message-ID: <1276C0564833F043AB4C85ED8DA9CFE502AF054F@ctemail1.nioo.int>
Permalink:  ../1276C0564833F043AB4C85ED8DA9CFE502AF054F@ctemail1.nioo.int/
Also on:    postgresql.org/message-id/1276C0564833F043AB4C85ED8DA9CFE502AF054F@ctemail1.nioo.int

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: L.teMarvelde@nioo.knaw.nl
  Subject: Re: Sqldf - error message
  In-Reply-To: <1276C0564833F043AB4C85ED8DA9CFE502AF054F@ctemail1.nioo.int>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox