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 doesnt
> 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
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
: [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
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
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
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=
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 |
Can anybody help with why I am receiving the error
below?
Thanks
K.C.
parts=# \d
av_parts
Table "av_parts"
Attribute |
Type
|
Modifier
-+-+-