want to get the dates between start date and end date

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
ICE
Participant
Posts: 249
Joined: Tue Oct 25, 2005 12:15 am

want to get the dates between start date and end date

Post by ICE »

Dear All,

I would like to get the rows with each and every dates between start date and end date and fetch to my datawarehouse. My source table contains only start date and end date where my target table should store with specific dates which between comming record start date and end date.
Do you think it can be done in datastage job??? If yes, may I know how to do it?
Curretly I cann't find the way to do it :(


Thank u,
ICE
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

There are a couple of approaches possible. One would be to have a time dimension where you can SELECT all records between two dates and thus use a lookup or join in your job. Another option would be to write a DS/BASIC function which returns a list of dates. Neither is exceptionally difficult to do.
ICE
Participant
Posts: 249
Joined: Tue Oct 25, 2005 12:15 am

Post by ICE »

Dear Armdw,

Yeah. I have time dimension. But date between start date and end date will be more than 1 rows and I don't know how to get the between dates. I cann't consider how to map between date from date dimension with my startdate and enddate :(. If I reference with startdate it will only get 1 day. Right?
Is there any detail steps please???

Thank u for your time,
ICE

ArndW wrote:There are a couple of approaches possible. One would be to have a time dimension where you can SELECT all records between two dates and thus use a lookup or join in your job. Another option would be t ...
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Use a left outer join between your time dimension and data.
ICE
Participant
Posts: 249
Joined: Tue Oct 25, 2005 12:15 am

Post by ICE »

Dear ArndW,

Nope. The time dimension is on target database. It is not in source database :(
Is there any idea please???


Thank u for your time,


ArndW wrote:Use a left outer join between your time dimension and data. ...
ICE
Participant
Posts: 249
Joined: Tue Oct 25, 2005 12:15 am

Post by ICE »

Dear Chulett,

I got an idea.
Thank you so much your advise.


Thank u for ur time,
Have a nice day!!!
ICE

ArndW wrote:Use a left outer join between your time dimension and data. ...
vivekgadwal
Premium Member
Premium Member
Posts: 457
Joined: Tue Sep 25, 2007 4:05 pm

Post by vivekgadwal »

ICE wrote:Dear Chulett,

I got an idea.
Thank you so much your advise.
Please share your idea with us so that if somebody else is looking for the same problem, it will be helpful for them too!
Vivek Gadwal

Experience is what you get when you didn't get what you wanted
Post Reply