Received: from maia.hub.org (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id E84EC632F35 for ; Fri, 20 Nov 2009 11:37:44 -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 57657-09 for ; Fri, 20 Nov 2009 15:37:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pw0-f44.google.com (mail-pw0-f44.google.com [209.85.160.44]) by mail.postgresql.org (Postfix) with ESMTP id BCFF3632CDC for ; Fri, 20 Nov 2009 11:37:36 -0400 (AST) Received: by pwj15 with SMTP id 15so2315518pwj.3 for ; Fri, 20 Nov 2009 07:37:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=1yhyMVtoll16piI5yD58oh8aeZQ2DqhaLU3Qy96c80E=; b=gpImVdc3gm1Lmp+hEM2dVAELXRZiQzAVPxh3yNMbpM6sagDo1bv+8MMITJbb3TVMv3 OZUhsgQfO2kn3WXZOH367e+ARqkRZHuIIwHEJgZq3w+Lop5jUHUkUxnjYdTDgVL9xHxR NCqlJf0acpaIZ8K75m9dzXwha3VleqcCKQmiU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=W/e9Y5X7aChW1M07ngKvOmSlQAiQOWnUaqdsQvtrTHFspn5yPCZtQ+qVSXl27VKrCk ic8uqc8TxiS55t2IZDddNKS1Apa8SRgPlPkeiFHHq3Qkv/spo6Pt07zGRU7vAwUS0Th2 FCZBV2QfhFOVqjnUo3PJVGBRWpWvaQFJ4nNt8= Received: by 10.114.9.2 with SMTP id 2mr2061613wai.197.1258731454549; Fri, 20 Nov 2009 07:37:34 -0800 (PST) Received: from ?172.16.1.230? ([208.187.158.94]) by mx.google.com with ESMTPS id 20sm1021762pxi.15.2009.11.20.07.37.32 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 20 Nov 2009 07:37:33 -0800 (PST) Message-ID: <4B06B78B.5000304@gmail.com> Date: Fri, 20 Nov 2009 08:36:43 -0700 From: Rob Sargent User-Agent: Thunderbird 2.0.0.23 (X11/20090817) MIME-Version: 1.0 To: "Marvelde, Luc te" CC: Pavel Stehule , pgsql-sql@postgresql.org Subject: Re: Sqldf - error message References: <1276C0564833F043AB4C85ED8DA9CFE502AF054F@ctemail1.nioo.int> <162867790911200637l1c16438apc4bfa3ebef0210d2@mail.gmail.com> <1276C0564833F043AB4C85ED8DA9CFE502AF0561@ctemail1.nioo.int> In-Reply-To: <1276C0564833F043AB4C85ED8DA9CFE502AF0561@ctemail1.nioo.int> Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.599 tagged_above=-10 required=5 tests=BAYES_00=-2.599 X-Spam-Level: X-Archive-Number: 200911/68 X-Sequence-Number: 33419 I think you (or I) might misunderstand TL's comment. The sql is probably being sent by some late-in-the-client-side-game driver with names quoted with double-quote marks, but the database does not have the column names etc in mixed case. Can you connect directly to the postgres server (psql -h dbservername -U dbusername) to see the definition of the tables in question (\d dbtablename)? Marvelde, Luc te wrote: > Nothing is wrong with the data... Everything is there in the dataframe. All the names are case sensitive, but the way it is spelled is correct.... So that cant be the problem > > Luc > > -----Original Message----- > From: Pavel Stehule [mailto:pavel.stehule@gmail.com] > Sent: vrijdag 20 november 2009 15:38 > To: Marvelde, Luc te > Cc: pgsql-sql@postgresql.org > Subject: Re: [SQL] Sqldf - error message > > 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 = >> 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) > > 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 >> 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 :) >> >> >> >> >