One of the ways would be to.
read only the field you need using a cut command in UNIX.
replace '\n' with a ','.
pass this as a parameter to the job or sequence.
Set global variable from file
Moderators: chulett, rschirm, roy
-
- Premium Member
- Posts: 258
- Joined: Tue Jul 04, 2006 10:35 pm
- Location: Toronto
Re: Set global variable from file
Cheers,
Samyam
Samyam
I wouldn't pass a list of "50 or 101" values as a parameter in a job, you can build a string and do it I just wouldn't recommend it. In your shoes I would load those values to a work table and then change your SQL to be more like:
That would work regardless of the number of rows in the input file.
Code: Select all
Select * from table where field in (select field from work_table);
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Premium Member
- Posts: 258
- Joined: Tue Jul 04, 2006 10:35 pm
- Location: Toronto
-
- Participant
- Posts: 36
- Joined: Thu Dec 03, 2009 9:11 pm
- Location: Malaysia
Re: Set global variable from file
hi
I would suggest you to write all the required columns in a temp table and then use that temp table data to get your required search
OR
use the looping mechanism , read the content of file one by one and then view the records either at one go or read all the data .
I would suggest you to write all the required columns in a temp table and then use that temp table data to get your required search
OR
use the looping mechanism , read the content of file one by one and then view the records either at one go or read all the data .
Naveen Kumar
Datastage Consultant
Datastage Consultant
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: