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

recursive query numeric overflow issue - response (5) by Raja_KT

$
0
0

Hi,

Stored procedure has loop, cursor,do while,if else etc condition.

There are lots of sample stored procedures in net.

 

Examples below are some snippets of code

CREATE PROCEDURE abc (

OUT parm1 INTEGER,

IN parm2 CHAR(13),

......

)

DECLARE hNumber INTEGER;

 

L1: LOOP

---Your select 

 

 

IF (CHECKING) THEN

LEAVE L1;

END IF;

END LOOP L1;

 

 

 

FOR emp1 AS emp_det CURSOR FOR

your select ....

DO

Your DML...

END FOR;

 

You can think of a nested loop and check the condition.

 

You can call  a stored procedure recursively.

 

Maybe you can try so that you can get the feel.

 

Cheers,

Raja


Viewing all articles
Browse latest Browse all 14773

Trending Articles



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