Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

Variable insert statement

$
0
0

Hello,

 

I have a stored procedure I am creating and I need to do n amount of insert statements based upon the number of results I get back from a select statement. So for example I have

 

 

SELECT  DISTINCT IDPERSON FROM "_SYS_BIC"."rtsa/AT_CASE_CONTACTS" WHERE IDCASE=137; I will get back a various amount of ID's

 

then I want to do an insert statement into a table for each ID I get back. So If I get back 3 Ids I want to have

 

Insert into TableA values(ID1,x,...),

 

Insert into TableA values(ID2,x,...),

 

Insert into TableA values(ID3,x,...)

 

How would this be done?

 

 

Thanks,

 

Connor


Viewing all articles
Browse latest Browse all 6412

Trending Articles



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