July 15, 2002 at 10:06 am
Is it possible to do an update statement using a self join? We are currenlty using a cursor.
I have oversimplified the example:
UPDATE table_x
SET b.elig_end_Date = a.elig_end_Date+1
FROM table_x a, table_x b
WHERE a.elig_tag<>b.elig_tag
Thanks!
-K
July 15, 2002 at 10:44 am
I got it,sorry:
UPDATE table_x
SET end_Date = b.end_Date
FROM table_x , table_x b
WHERE table_x.elig_tag<>b.elig_tag and table_x.elig_tag=1
July 15, 2002 at 11:27 am
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply