Archives of the TeradataForum
Message Posted: Sun, 28 Apr 2003 @ 05:29:42 GMT
This is my first time using the List Server Teradata User Group and I was wondering if anyone can help me out. In Stored Procedures, is there a way to move though the Cursor to compare one row with the next row. I've been studying the Chapter 4 of the SQL Reference Volume 6 and I see the "WHERE CURRENT OF", but nothing showing if moving through the cursor is doable.
I am trying to place the first row of the cursor into a previous row variable and compare it to the next row. if they are the same I would like to delete the previous row information from another table. Now if the next row is different I would place it in the previous row variable and continue to load the next row and compare it to the new previous row variable again.
Any suggestions would be greatly appreciated.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 23 Jun 2019|