var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: update statement
I want to do something like below. Plz lemme know how can this be achieved..
set x.a = y.a
x.b = y.b
where x.c = y.c
(y is another table)
Would this work?
UPDATE x SET
(x.a, x.b) =
(SELECT y.a, y.b
WHERE y.c = x.c
Last edited by Littlefoot; 05-12-04 at 08:48.
set (x.a, x.b) = (select y.a, y.b from y where x.c = y.c)
where exists (select null from y where x.c = y.c);
The WHERE clause on the update is there to prevent a and b being set to NULL when no matching y record is found. If you would want them set NULL, remove the WHERE clause!
ya.. it worked..
Ah, where exists ... I always learn something new from you, Tony. Thank you!