|
|
Archives of the TeradataForum
Message Posted: Mon, 28 Apr 2003 @ 13:16:52 GMT
Subj: | | Re: Moving through Cursor in Stored Procedure |
|
From: | | Dieter N�th |
Joseph Massena wrote:
| 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. | |
A much faster way than a cursor is probably using OLAP-functions. So please post more info about tables used etc.
Dieter
| |