Looping of data from Teradata Global Temporary Tables

Database

Looping of data from Teradata Global Temporary Tables

Hi,
I've created a Global Temporary Table to avoid cursor. I need to fetch the records and then loop it. Depending on the values i obtain i need to process it. Can anyone tell me how can i do this.

I'm basically looking for any Replacement of %ROWTYPE and CURSOR.NEXT_RECORD of Oracle in T-SQL.

Thanks
1 REPLY
Senior Apprentice

Re: Looping of data from Teradata Global Temporary Tables

Hmmm, you're replacing a cursor with a temp table and then use a cursor to process the temp table rows?

Cursors are only allowed within Embedded SQL and Stored Procedures, check the manuals...

Could you please provide some more details, cursors can be replaced with SQL in most cases, as long as it's DML.

Dieter