Hi All,
I am trying to insert today's date into oracle table from SAS but getting error. How can we do this?
I am doing below:-
a.
PROC SQL ;
insert into ORA.test
Select
SYSDATE, OO.* from WORK.OUTPUT OO ;
QUIT;
Below is error i am getting:-
ERROR: The following columns were not found in the contributing tables: SYSDATE.
b.PROC SQL ;
insert into ORA.test
Select
today(), OO.* from WORK.OUTPUT OO ;
QUIT;
Below 2 things happen:-
1. Sometimes it shows error saying:- invalid character ( because of brackets in today() )
2.And sometimes it enter "01/JAN/60" date into the oracle table.
Thanks
RDS
Please try:
insert into ORA.TEST
select datetime(), * from WORK.OUTPUT ;
Please try:
insert into ORA.TEST
select datetime(), * from WORK.OUTPUT ;
sysdate is an oracle keyword,
date() returns a date. Oracle usually stores date times.
Dates count days. Datetimes count seconds. Search the topic if you are unaware.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.