![]() |
|
Archives of the TeradataForumMessage Posted: Tue, 01 Apr 2008 @ 11:13:48 GMT
Hi, Please do the following modifications to the test case and it works. 1) Remove semicolon after SELECT statement 2) Use 'END FOR' instead of 'END LOOP'.
FOR REC AS test CURSOR FOR
SELECT DISTINCT column_name1
FROM table_name1
WHERE column_name2= 'Y'
GROUP BY column_name1
HAVING COUNT(*)>1
DO
SET variable1 = REC.column_name1;
Rest of select and update statements
END FOR;
Thanks Syamala
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||