Oracle Date logic
Moderators: chulett, rschirm, roy
Oracle Date logic
Can anybody please tell me how to implement this date logic in datastage?
Oracle :
trunc(last_day(add_months(sysdate,-1)))
Oracle :
trunc(last_day(add_months(sysdate,-1)))
Do you know what the sql logic does? If so, please describe it in the thread. Once the desired results are known, then a solution can quickly be found.
If you don't know what the sql does, please say so. Then someone can describe that and you will learn that much more!
Regards,
If you don't know what the sql does, please say so. Then someone can describe that and you will learn that much more!
Regards,
- james wiles
All generalizations are false, including this one - Mark Twain.
All generalizations are false, including this one - Mark Twain.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Well, the time part is easy, as that's a constant.
As to the date part, simply subtract one more than the day number from the date, using DateFromDaysSince() function.
As to the date part, simply subtract one more than the day number from the date, using DateFromDaysSince() function.
Code: Select all
DateFromDaysSince(svTheDate, DayFromDate(svTheDate) + 1)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
What you need to get is a premium membership - this will allow you to read the entirety of the premium posters' contributions, and will help to fund the continued existence of DSXchange. All premium membership fees are devoted to the hosting and bandwidth costs of DSXchange.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.