Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 8D24E632AE6 for ; Fri, 20 Nov 2009 10:31:01 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 49276-02 for ; Fri, 20 Nov 2009 14:30:52 +0000 (UTC) X-Greylist: delayed 00:12:13.739017 by SQLgrey-1.7.6 Received: from smtp.ceme.nioo.knaw.nl (smtp.ceme.nioo.knaw.nl [194.171.40.40]) by mail.postgresql.org (Postfix) with ESMTP id 71B3A630733 for ; Fri, 20 Nov 2009 10:30:52 -0400 (AST) Received: from ctemail1.nioo.int ([10.112.37.30]) by smtp.ceme.nioo.knaw.nl with Microsoft SMTPSVC(6.0.3790.3959); Fri, 20 Nov 2009 15:18:34 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01CA69EC.58061A73" Subject: Sqldf - error message Date: Fri, 20 Nov 2009 15:18:33 +0100 Message-ID: <1276C0564833F043AB4C85ED8DA9CFE502AF054F@ctemail1.nioo.int> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Sqldf - error message Thread-Index: Acpp7FdoQgeNSzNdREGUddMlN6GXWw== From: "Marvelde, Luc te" To: Cc: "Marvelde, Luc te" X-OriginalArrivalTime: 20 Nov 2009 14:18:34.0742 (UTC) FILETIME=[58425160:01CA69EC] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.598 tagged_above=-10 required=5 tests=BAYES_00=-2.599, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200911/62 X-Sequence-Number: 33413 This is a multi-part message in MIME format. ------_=_NextPart_001_01CA69EC.58061A73 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable 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 =3D dbo_tbl_Broedsels.BroedselID) + INNER JOIN dbo_tbl_Nestkasten ON dbo_tbl_BroedselLocatie.NestkastID = =3D dbo_tbl_Nestkasten.NestkastID) + INNER JOIN dbo_tbl_Terrein ON dbo_tbl_Nestkasten.TerreinNummer =3D dbo_tbl_Terrein.TerreinNummer + WHERE (((dbo_tbl_Terrein.RingCentraleNaam)=3D'Oosterhout a/d = Waal'));") I get the following message: Error in sqliteExecStatement(con, statement, bind.data) :=20 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:=20 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:=20 .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 :) ------_=_NextPart_001_01CA69EC.58061A73 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Sqldf - error message

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 =3D = dbo_tbl_Broedsels.BroedselID)
+ INNER JOIN dbo_tbl_Nestkasten ON = dbo_tbl_BroedselLocatie.NestkastID =3D = dbo_tbl_Nestkasten.NestkastID)
+ INNER JOIN dbo_tbl_Terrein ON = dbo_tbl_Nestkasten.TerreinNummer =3D = dbo_tbl_Terrein.TerreinNummer
+ WHERE = (((dbo_tbl_Terrein.RingCentraleNaam)=3D'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 = :)





------_=_NextPart_001_01CA69EC.58061A73--