Hi All,
I have a oracle stage.
it has to do insert records into the table.
for i in 1..number of levels loop
do the insert into the table
end loop,
note: the number of levels is parameter which will be passed
at run time.
eg : if the number of levels is 3 then records will
inserted into the table 3 times ( it is a requirement.)
can anyone please suggest me how can I accomplish this in oracle stage.
i am using datastage 7.5.1 and OS is unix.
thanks
pavi
inserts into oracle stage
Moderators: chulett, rschirm, roy
So if i have understood your requirement correctly, the number of times a particular record will be inserted will depend upon a parameter value.
Correct?
A couple of ways,
-look into the start loop and end loop activity in a sequence job. Run the same job n number of times
-build your load ready file, cat it n number of time together, redirect the output to another file and use the new file as a single load into the table
I am sure others have more ways, but those are a few from me.
Correct?
A couple of ways,
-look into the start loop and end loop activity in a sequence job. Run the same job n number of times
-build your load ready file, cat it n number of time together, redirect the output to another file and use the new file as a single load into the table
I am sure others have more ways, but those are a few from me.
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
I think using the loop activity will be the simplest as well as the most effective way of achievinh this.DSguru2B wrote:So if i have understood your requirement correctly, the number of times a particular record will be inserted will depend upon a parameter value.
Correct?
A couple of ways,
-look into the start loop and end loop activity in a sequence job. Run the same job n number of times
-build your load ready file, cat it n number of time together, redirect the output to another file and use the new file as a single load into the table
I am sure others have more ways, but those are a few from me.
It took me fifteen years to discover I had no talent for ETL, but I couldn't give it up because by that time I was too famous.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
You can not write loops in the Oracle stage itself. Therefore you basically have two choices; use Start Loop and End Loop activities in a job sequence, as the others have suggested, or use an Oracle stored procedure.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.