Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I would like to Loop through mulitple ID column for sql table via Insert query.
Curious - What will be design of Job for looping Inset SQL
Here is the Insert statement that I want to loop for Columns req_id , driver_id
driver id is 36 ,37, 38.39 always fixed for Paticular action called X .
for Particular action X driver ID is fixed four number.
similarly,
we have Y action for driver_id 33 ,34,35,36 is fixed number
INSERT INTO audit_tbl
req_id,
col2,
col3,
col4,
col5,
col6,
col7,
driver_id,
col8,
col9
)
VALUES
(
1294887,
'2020-10-05 00:00:00',
'',
'2020-10-05 00:00:00',
'2020-10-05 00:00:00',
-1,
'N',
36,
0,
0
);
We tried
I am trying to think in this direction
Job design - Are this design feasible in this situation
tmsinnput >>tflowtoiterate >> tjava >>tforeach / tloop (for min, max driver_id) >>tmssqlrow
or
receive request table select input >> iterate for request id >> process condition if action O >> loop for min max driver ID records >> execute insert query in audit table
Hi
You want to loop 4 times for each req_id that read from the input table? I don't understand ' process condition if action O', I think I need more information to help you out.
Regards
Shong
Here we have 4 actions( O, UO,UF,F) available foreach we have four driver ID exist
How the actions come from? They are read also from input table?
Action sql server table exist. after process creation I have to point this child job into context that is i have to run from Parent job.
Not able to run. can you please help me in pointing the job