Your first CREATE statement is make a CHARACTER variable.
Your second CREATE statement is assuming that the variable SRC_DT in the TMP dataset is NUMERIC and has value are the number of days since 01JAN1960. Otherwise you could not attach the numeric format DATE9. to the variable and have it print anything reasonable.
Errors about NULL values sounds like perhaps the table in Oracle is defined with a NOT NULL constraint. Do you have any missing values in the dataset B? For which variables? Does dataset B have ALL of the variable that exist in the Oracle table TB1? Otherwise SAS will set those values to NULL, which might be the cause of the NULL value message.
Your first CREATE statement is make a CHARACTER variable.
Your second CREATE statement is assuming that the variable SRC_DT in the TMP dataset is NUMERIC and has value are the number of days since 01JAN1960. Otherwise you could not attach the numeric format DATE9. to the variable and have it print anything reasonable.
Errors about NULL values sounds like perhaps the table in Oracle is defined with a NOT NULL constraint. Do you have any missing values in the dataset B? For which variables? Does dataset B have ALL of the variable that exist in the Oracle table TB1? Otherwise SAS will set those values to NULL, which might be the cause of the NULL value message.
Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!
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.