![]() |
|
Archives of the TeradataForumMessage Posted: Wed, 08 Nov 2006 @ 09:46:42 GMT
Hi, According to me this should work
UPDATE lp_test_table lp1
SET NEXT_OB_TMSTMP = (SELECT min(lp2.OB_TMSTMP)
FROM lp_test_table lp2
WHERE lp2.lead_num = lp1.lead_num
AND lp2.OB_TMSTMP > lp1.OB_TMSTMP);
While writing inner query "from" aliasing is not done properly. Regards, hjshah22
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||