Skip site navigation (1) Skip section navigation (2)


From: chris Gnther <guenther(at)uscreen(dot)de>
To: pgsql-novice(at)postgresql(dot)org
Subject: DELETE FROM fails
Date: 2001-03-28 09:51:56
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-novice
Hi folks,

I have the problem that I can't delete datasets out of my tables. It's like that:
I have a table:
	ID_Shop	oid with sequence

there is an index on ID_Country

I have a second table:
	ID_Country	oid with sequence

I have a reference between these two tables pointing from tblshop.ID_Country to 

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:

	ERROR:  Attribute 'id_shop' not found

Please, can anyone help me out? It is really anoying when you can't delete datasets
especially because my application is already online (I use postgres with PHP) and 
there are 20 tables with alltogether 120 MB of data in it


| chris                       |
| Database Developer          |
| uscreen GmbH                |
|                             |
| --------------------------- |
| eMail   guenther(at)uscreen(dot)de |
| Fon   (02 02) 24 49 88 - 23 |


pgsql-novice by date

Next:From: Pete JewellDate: 2001-03-28 10:14:05
Subject: Re: Problems accessing TCL functions
Previous:From: dhninhDate: 2001-03-28 04:11:11
Subject: connect to MS SQL server

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group