I have a table with ID's and I want to pass these ID's as an input to an API to fetch the details. The API URL looks something similar to this "https://xxx/yyy/id". Currently, I am able to pass only one ID from Table1 to API and get the out but I want it to be a recurring process or pass all the ID from TABLE1 to API and I don't know how to do it.
If it was a 2 TABLES then I can use IN function and get all the ID from TABLE1 and pass it to TABLE2, since it is an API, I am having trouble
NOTE:- I am working on TIBCO.
PROCEDURE Test(
IN rd1 VARCHAR(255),
OUT result CURSOR(
Id VARCHAR(255),
StartTime VARCHAR(255),
EndTime VARCHAR(255)))
BEGIN
DECLARE prog_id VARCHAR(255);
SET prog_id = (Select Id FROM TABLE1(rd1));
OPEN result FOR SELECT
API.Id,
API.StartTime,
API.EndTime
FROM TABLE1(rd1) TAB1 INNER JOIN
API(prog_id) API ON TAB1.Id = API.Id;
END;
Actual Result: Only one ID is passed.
Expected Result: A recurring process where it passes all the ID's from TABLE1 to TABLE2