Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 54382632655 for ; Fri, 20 Nov 2009 10:45:22 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 87484-10 for ; Fri, 20 Nov 2009 14:45:02 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-yw0-f198.google.com (mail-yw0-f198.google.com [209.85.211.198]) by mail.postgresql.org (Postfix) with ESMTP id 3920C632432 for ; Fri, 20 Nov 2009 10:45:11 -0400 (AST) Received: by ywh36 with SMTP id 36so2898635ywh.15 for ; Fri, 20 Nov 2009 06:45:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=mFf3YR+e1h/Ygd83XeDOnIAKMO+DTxWMHDBw7fzoNnM=; b=bfXcHbgFwGy058KmibkdVx+lv/ydVltGA/jlvGZloX4biJJXKaQwpxSjGnhrQlGfOD ggNPFXl1HlrL4hLnepIFxqWP/4uBenZEfFWluGRHz1GvxBukyuPUJcmJ3JgS0Xvq0S20 adY+RuaRwsb4ZICbyaYAHERicFL5DtvO2tPWM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=xnFxVYX6YWaUZb6NYaDbF8R+BC2mdHzUIB6QiJ7QgQeaZdCFGQYG0B1R8jaUZlY91d iXrWGWJlkdS/otdbILVqvoIC0nH2QKMIn8jUSnZTS5y2MhOoyx2w4RbO6OVxUJgAW5wK /x4truhXovip9c6suPj+0LTe8zCExJWhZzACc= MIME-Version: 1.0 Received: by 10.150.21.42 with SMTP id 42mr2738442ybu.180.1258727876656; Fri, 20 Nov 2009 06:37:56 -0800 (PST) In-Reply-To: <1276C0564833F043AB4C85ED8DA9CFE502AF054F@ctemail1.nioo.int> References: <1276C0564833F043AB4C85ED8DA9CFE502AF054F@ctemail1.nioo.int> Date: Fri, 20 Nov 2009 15:37:56 +0100 Message-ID: <162867790911200637l1c16438apc4bfa3ebef0210d2@mail.gmail.com> Subject: Re: Sqldf - error message From: Pavel Stehule To: "Marvelde, Luc te" Cc: pgsql-sql@postgresql.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.576 tagged_above=-10 required=5 tests=AWL=0.023, BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200911/65 X-Sequence-Number: 33416 Hello 2009/11/20 Marvelde, Luc te : > 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) : > =C2=A0 RS-DBI driver: (error in statement: no such column: > dbo_tbl_Broedsels.BroedselID) > > ( I also tried removing the 'dbo_tbl_'=C2=A0 part of the dataframe names,= but > still the same problem occurred) I thing, you have a problem with data. Probably some creating script was broken or some similar. The message is clean. Your database has not column BroedselID. Recheck your query, please. Im not sure - maybe SQLite identifiers are case sensitive. Maybe are defined as case sensitive. Regards Pavel Stehule > > Now ofcoarse I looked on google, because I was sure someone would have ha= d > 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 err= or=E2=80=A6 > 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=E2=80=A6 but t= hen when i > look in their help, i cannot see how i can easily use those commands=E2= =80=A6 > > Anyone? > > Kind regards, > > Luc te Marvelde > New member :) > > > >