Hi,
I have to use a query in DB2 stage SELECT * FROM TABLE_NAME WHERE DATE <= "Current timestamp"
Can any one tells me about the MetaSQL function which can be used for CurrentTimestamp.
%CurrentDateTimeIn() == is the right function or not?
Kindly help me
Cuurentimestamp Function in DB2 stag2
Moderators: chulett, rschirm, roy
Hi,
You have 2 options to go about your question:
1. the current timestamp is an SQL function which is DB specific and relates to the exact point in time the quesry is analyzed by your db.
Oracle analogy:
2. the current timestamp is a set point in time which is a static representation in the SQL sent to the DB.
Oracle analogy:
You can ask your DBAs for the format and or conversions available to get a proper syntax.
IHTH,
You have 2 options to go about your question:
1. the current timestamp is an SQL function which is DB specific and relates to the exact point in time the quesry is analyzed by your db.
Oracle analogy:
Code: Select all
select * from <table name> where <column> <= sysdate()
Oracle analogy:
Code: Select all
select * from <table name> where column <= to_date('#DS_job_parameter#','<format>')
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org
Time is money but when you don't have money time is all you can afford.
Search before posting:)
Join the DataStagers team effort at:
http://www.worldcommunitygrid.org