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