Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Internal stored procedure getting executed only once within a do-while loop in a main stored procedure. - forum topic by TD@NIAR

$
0
0

I am trying to call a stored procedure within a do-while loop in a main stored procedure.
The problem is that internal stored procedure is getting executed only once and the code exits from the internal stored procedure rather than executing in a loop.
Could you please help mein identifying the reason for the above problem.
My code looks like this
 
WHILE(CC_MAX<=CC_MIN)
DO
SELECT V1 INTO V2 FROM DB.TBL WHERE PI = CC_MIN
CALL DB.SP(DB,TB,V1);
CC_MIN = CC_MAX +1;
END WHILE
 
Thanks in advance!!!
NIAR

Forums: 

Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>