Re: [SQL] update syntax

2005-06-15 Thread Bruno Wolff III
On Wed, Jun 15, 2005 at 14:35:42 +0200, Praveen Raja <[EMAIL PROTECTED]> wrote: > Thanks. The UPDATE works ok now. But using the same logic it doesn’t > seem possible to delete rows. Is this also possible? Yes. When you use table names in the where clause they are automatically added to the join

Re: [SQL] update syntax

2005-06-15 Thread Bruno Prévost
AND b.col3 = ‘somethingelse’)   - Original Message - From: Praveen Raja To: 'Bruno Prévost' Cc: pgsql-sql@postgresql.org Sent: Wednesday, June 15, 2005 8:35 AM Subject: RE: [SQL] update syntax Thanks. The UPDATE works ok now. But using the same l

Re: [SQL] update syntax

2005-06-15 Thread Praveen Raja
: [SQL] update syntax   Try something like this   UPDATE table1 SET col1 = b.col1 FROM table1 b WHERE table1.col2 = b.col2 and table1.col3 = ‘something’ and b.col3 = ‘somethingelse’   - Original Message - From: Praveen Raja To: pgsql-sql@postgresql.org

Re: [SQL] update syntax

2005-06-15 Thread Bruno Prévost
Subject: [SQL] update syntax Hi,   While using Ms SQL server I used to write update statements like this,   UPDATE a SET a.col1 = b.col1 FROM table1 a INNER JOIN table1 b ON a.col2 = b.col2 WHERE a.col3 = ‘something’ AND b.col3 = ‘somethingelse’   But I

[SQL] update syntax

2005-06-15 Thread Praveen Raja
Hi,   While using Ms SQL server I used to write update statements like this,   UPDATE a SET a.col1 = b.col1 FROM table1 a INNER JOIN table1 b ON a.col2 = b.col2 WHERE a.col3 = ‘something’ AND b.col3 = ‘somethingelse’   But I can’t seem to do this in postgres, it gives me an error

Re: [SQL] update syntax error?

2000-08-21 Thread mikeo
query should have a comma instead of the word and... HTH mikeo At 04:27 PM 8/20/00 -0300, The Hermit Hacker wrote: > >UPDATE SET field1=,field2= > >On Tue, 15 Aug 2000, k.c. hemelstrand wrote: > >> Can anybody help with why I am receiving the error below? >> >> Thanks >> K.C. >> >> >> parts=

Re: [SQL] update syntax error?

2000-08-20 Thread The Hermit Hacker
UPDATE SET field1=,field2= On Tue, 15 Aug 2000, k.c. hemelstrand wrote: > Can anybody help with why I am receiving the error below? > > Thanks > K.C. > > > parts=# \d av_parts > Table "av_parts" > Attribute |Type |

[SQL] update syntax error?

2000-08-20 Thread k.c. hemelstrand
Can anybody help with why I am receiving the error below?   Thanks K.C.     parts=# \d av_parts Table "av_parts"  Attribute  |    Type |   Modifier    -+-+-