Hi Everyone,
Is there a way to use the Oracle SYSDATE function when populating a date field in a Oracle target table?
I have tried to use syntax such as Oconv(date(), "D4-DMY") in stage variables, but I can't get the format right for Oracle. Even when I just use a string such as "01-JAN-2004" I still get an ODBC error. What's the secret to populating today's date in Oracle?
Thanks,
Larry
SYSDATE in Oracle
Moderators: chulett, rschirm, roy
Re: SYSDATE in Oracle
lrashley wrote:Hi Everyone,
Is there a way to use the Oracle SYSDATE function when populating a date field in a Oracle target table?
I have tried to use syntax such as Oconv(date(), "D4-DMY") in stage variables, but I can't get the format right for Oracle. Even when I just use a string such as "01-JAN-2004" I still get an ODBC error. What's the secret to populating today's date in Oracle?
Thanks,
Larry
Think I'll answer my own post this time:
To use SYSDATE, simply add a new column in the source stage and set the derivation to 'SYSDATE'. Then you can just link this column to the target field.
That's certainly one way. You can also handle it at the target side by using Custom Sql, leaving the target field out of the column list and using 'SYSDATE' as its value in the SQL.
You'll find this Forum has quite a bit of information in it. Between it and the Oliver archives that are hosted here, you'll find that most questions have already been asked and answered. Usually several times. Much like this one.
Oh, and welcome aboard!
You'll find this Forum has quite a bit of information in it. Between it and the Oliver archives that are hosted here, you'll find that most questions have already been asked and answered. Usually several times. Much like this one.
Oh, and welcome aboard!
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 19
- Joined: Fri Apr 02, 2004 10:13 am
Re: SYSDATE in Oracle
You can also define the column as a Timestamp and use the following code to populate -> OCONV(DATE(), "D4-YMD[4,2,2]") : " " : OCONV(TIME(), "MTS:")lrashley wrote:Hi Everyone,
Is there a way to use the Oracle SYSDATE function when populating a date field in a Oracle target table?
I have tried to use syntax such as Oconv(date(), "D4-DMY") in stage variables, but I can't get the format right for Oracle. Even when I just use a string such as "01-JAN-2004" I still get an ODBC error. What's the secret to populating today's date in Oracle?
Thanks,
Larry
Naren