Processing 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
chitravallivenkat
Participant
Posts: 106
Joined: Thu Jun 08, 2006 8:51 am

Processing Date

Post by chitravallivenkat »

In one the text report which i am generating should includes only transactions with processing_date within the monthly reporting period. E.g. 20080601 to 20080630 for the month of June report.

This is one of the selection cretria to generate the report using sybase.

How shal i implement this and the Processing_date is the field from one of the table from sybase database.

Please suggest me on this..
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Two job parameters, for example jpStartDate and jpEndDate.

The SELECT statement then has the restriction

Code: Select all

WHERE Processing_Date BETWEEN #jpStartDate# AND #jpEndDate#
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chitravallivenkat
Participant
Posts: 106
Joined: Thu Jun 08, 2006 8:51 am

Post by chitravallivenkat »

Thank you so much it worked out,

Similarly i have other selection cretria in which the Processing_month field should have the value of Last 12 month, counting back from October 31.

How shal i implement this.
chitravallivenkat
Participant
Posts: 106
Joined: Thu Jun 08, 2006 8:51 am

Post by chitravallivenkat »

Thank you so much it worked out,

Similarly i have other selection cretria in which the Processing_month field should have the value of Last 12 month, counting back from October 31.

How shal i implement this.
chitravallivenkat
Participant
Posts: 106
Joined: Thu Jun 08, 2006 8:51 am

Post by chitravallivenkat »

Thank you so much it worked out,

Similarly i have other selection cretria in which the Processing_month field should have the value of Last 12 month, counting back from October 31.

How shal i implement this.
chitravallivenkat
Participant
Posts: 106
Joined: Thu Jun 08, 2006 8:51 am

Post by chitravallivenkat »

Thank you so much it worked out,

Similarly i have other selection cretria in which the Processing_month field should have the value of Last 12 month, counting back from October 31.

How shall i implement this.
dineshrk
Participant
Posts: 46
Joined: Thu Jun 26, 2008 9:14 pm

Post by dineshrk »

chitravallivenkat wrote:Thank you so much it worked out,

Similarly i have other selection cretria in which the Processing_month field should have the value of Last 12 month, counting back from October 31.

How shall i implement this.

Use the Iconv function to get the internal value of today's date and subtract 365 from that value and use an Oconv function to get the value of that date and pass the values to the SQL query.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

chitravallivenkat wrote:Thank you so much it worked out,

Similarly i have other selection cretria in which the Processing_month field should have the value of Last 12 month, counting back from October 31.

How shall i implement this.
Start with a clearer specification. Are you looking for a "year to date" figure starting from October 31, or the number of days since October 31, or perhaps the date of the most recent October 31? Until this is clear, an accurate suggestion can not be offered.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply