Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by mail.postgresql.org (8.11.3/8.11.1) with ESMTP id f2SFs7U99696 for ; Wed, 28 Mar 2001 10:54:09 -0500 (EST) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.4.1) with HTTP id 30884; Wed, 28 Mar 2001 07:54:05 -0800 From: "Josh Berkus" Subject: Re: DELETE FROM fails with error To: chris =?ISO-8859-1?Q?G=FCnther?= , pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.4.1 Date: Wed, 28 Mar 2001 07:54:05 -0800 Message-ID: In-Reply-To: <20010328115051.6ad6ad5d.guenther@uscreen.de> MIME-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit X-Archive-Number: 200103/579 X-Sequence-Number: 2249 Chris, > I have a reference between these two tables pointing from > tblshop.ID_Country to > tblcountry.ID_Country > > When I try to delete a row from tblshop I get the error that postgres > can't find > the attribute id_shop. My SQL-command looks like follows: > > DELETE FROM tblshop WHERE tblshop."ID_Shop" = 12 > > the same happens when I try to do: > > DELETE FROM tblshop WHERE tblshop."ID_Country" = 3 > > I also tried this query without quotes, with simple quotes (') > without the leading > tablename and so on, but I always get the error-message: Two possibilities: 1. You're using a couple of different cases in the above example. PostgreSQL is case-sensitive. What interface program are you using? What OS? From the error messages, it looks like your commands are being lower-cased by the interface or data transport, which would cause Postgres not to recognize the field names. a. Try you commands from PSQL on the Database server, making sure that your case is the same as the table definition. b. If you can down the DB for an hour, try re-naming one of the ID fields in lower case (one that isn't foriegn keyed, of course). 2. It's possible that defining these rows as type OID requires some special reference syntax. If so, hopefully someone on the list will come forward. -Josh Berkus ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco