Regarding For loop and cursor equivalent in BTEQ

Tools
Tools covers the tools and utilities you use to work with Teradata and its supporting ecosystem. You'll find information on everything from the Teradata Eclipse plug-in to load/extract tools.
Enthusiast

Regarding For loop and cursor equivalent in BTEQ

Hi ,

I need to know, Is there any way that we can write cursor equivalent code in BTEQ script.

I have a SP which I am trying to convert into BTEQ,in which I have For loop and cursor logic.

Can someone help me here?

Dieter,Feinholz...Please provide your sugestions/comments ..I has been trying multiple options but nothing worked out to replace for loop and cursor.

 

sample code

For ...cursor1 ..sel * from table1 order by 1

do

For ...cursor2 ..sel * from table2 order by1

do

For ...cursor3 ..sel * from table3 order by

 query1=cast(cursor1.col1) from table4

where cursor2.col1=cursor3.col1;

Any help is appreciated..

1 REPLY
Enthusiast

Re: Regarding For loop and cursor equivalent in BTEQ

I am not sure if BTEQ has this utility..

But loop..cursor is a performance killer even in Oracle DB.

 

Try to use direct DML to replace it,