"John B. Scalia" <[EMAIL PROTECTED]> writes:
> UPDATE my_table SET field1='new_value' AND SET field2='different_value'
> WHERE my_table_id = 'key';
The other responses have focused on your obvious syntax error, but I'm
assuming you didn't actually cut-and-paste that from your psql session.
> in p
John,
> Yeah, I figured out my SQL was bad and had switched to the comma
> separated version, instead. In my mind, the first form should have
> caused an error. I've attached a cut-and-pasted session from psql where
> I used this syntax on a test table. While edited for brevity and to
> obscure pa
John,
>
> UPDATE my_table SET field1='new_value' AND SET field2='different_value'
> WHERE my_table_id = 'key';
Well, your SQL is bad:
UPDATE my_table SET field1='new_value, field2='different_value'
WHERE my_table_id = 'key';
> in psql, it reports that it has successfully updated one record.
>
Shouldn't that be "UPDATE my_table SET field1 = 'new_value', field2 =
'different_value' WHERE my_table_id = 'key';"?
Wei
On Fri, 3 Oct 2003, John B. Scalia wrote:
> All,
>
>
>
> I'm not certain if what I'm trying to do is legal, but if I execute a
> statement like:
>
>
>
> UPDATE my_tab
On Fri, Oct 03, 2003 at 09:18:44 -0400,
"John B. Scalia" <[EMAIL PROTECTED]> wrote:
> All,
>
>
>
> I'm not certain if what I'm trying to do is legal, but if I execute a
> statement like:
>
>
>
> UPDATE my_table SET field1='new_value' AND SET field2='different_value'
> WHERE my_table_id =
All,
I’m not certain if what I’m trying to do is
legal, but if I execute a statement like:
UPDATE my_table SET field1=’new_value’ AND SET
field2=’different_value’ WHERE my_table_id = ‘key’;
in psql, it reports that it has successfully updated one
record. However, the record does