All Forums Tools
shanthuj 16 posts Joined 11/07
15 Jan 2009
BTEQ loop

Is there a way(other than .run file) to use loops to perform an iteration in BTEQ and quit based on a condition?

joedsilva 505 posts Joined 07/05
15 Jan 2009

I don't think that's possible, because even if you try to use some kind of logic and put a GOTO command to a previous label, it won't work as GOTO commands read labels only forward, it doesn't go back in the script and check.You have the option of going for a stored procedure, but generally it's discouraged due to performance reasons. So your options would be to check if you can re-write the entire stuff as an SQL (teradata supports lots of complex SQL operations, including recursion).

Mithafashi 10 posts Joined 11/11
08 Nov 2011

Yes recursion might be a good idea

You must sign in to leave a comment.