week id misiing

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
vinsashi
Participant
Posts: 150
Joined: Mon Aug 20, 2007 4:52 am
Location: singapore

week id misiing

Post by vinsashi »

Hi,
in source data i have two fileds
weekid value
1 10
2 20
3 30
4 40
5 50
in some times i will get data like this in source some weekids wil miss
weekid value
1 10
3 30
4 40
5 50
so in output i need like this
weekid value
1 10
2 0
3 30
4 40
5 50
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Join to a generated data stream containing 1, 2, 3, 4, 5. Use a left outer join, with the generated data being the left input. Convert the null to a zero.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
gssr
Participant
Posts: 243
Joined: Fri Jan 09, 2009 12:51 am
Location: India

Re: week id misiing

Post by gssr »

vinsashi wrote: so in output i need like this
weekid value
1 10
2 0
3 30
4 40
5 50
Get all the WeekId into a dataset and use Full Outer join with your Source file to get the desired Output...!
RAJ
vinsashi
Participant
Posts: 150
Joined: Mon Aug 20, 2007 4:52 am
Location: singapore

Post by vinsashi »

Thanks to All
Post Reply