Hi,
I am using Server edition. I have a database table which I query. Say the query returns 5 records, I need to process each record through a job. I believe I need to use a Loop here. But I do not know how to do that. I am new to DS so if you can just tell me in detail how to proceed.
Thanks in advance.
Processing each record using a loop
Moderators: chulett, rschirm, roy
Jobs automatically process records 'in a loop' without you having to do anything special. Meaning, each record will go from the first stage to the last stage individually and in order. An obvious simplification but generally correct.
So just build your job and don't worry about any 'loops'.
So just build your job and don't worry about any 'loops'.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
Ok, let's start over. The Execute Command stage is a Sequence job stage. My post was for Server jobs. It would be best if you fully explained exactly what it is you are trying to accomplish. The more details you give, the more relevant the answer will be.
Looping in a Sequence job is accomplished using (typically) the UserVariables stage to get a delimited list of the values to process and then the Start/End Loop stages to process each value one at a time. The pdf manuals discuss these stages or you can search the forums for, say... "UserVariables" to find other conversations on this topic.
Looping in a Sequence job is accomplished using (typically) the UserVariables stage to get a delimited list of the values to process and then the Start/End Loop stages to process each value one at a time. The pdf manuals discuss these stages or you can search the forums for, say... "UserVariables" to find other conversations on this topic.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
I suppose that your requirement is to extract records from a database which individually later to be sent to Execute Command Activity as parameter to that Command.Victoria wrote:I have a database table which I query. Say the query returns 5 records, I need to process each record through a job. I believe I need to use a Loop here.
My suggestion:
1. Create a Server Job which extracts the records from the database then use the UserStatus method to store the input records into user status area.(refer post)
2. Create a Job Sequence with Job Activity and Execute Command Activity and the Looping Activities then configure that with appropriate parameters. (individual record could be Job-parameterised to be sent as Command line parameter to the Command )