Hi All,
I am new to SAS. I am trying to extract data from SQL Server and load into Teradata.
My source table has few columns which are converted to 'yyyy-mm-dd' format and loaded to Teradata in the PROC sql.
when I am trying to append the dataset to Teradata, it gives me a warning:
WARNING: Variable OPPORTUNITY_TCV not appended because of type mismatch.
From source I am extracting it as below:
FORMAT(CAST([Status Change Date] AS DATETIME),'yyyy-MM-dd') AS [STATUS_CHANGE_DATE],
In the destination DB (Teradata) the column is defined as:
STATUS_CHANGE_DATE DATE FORMAT 'YYYY-MM-DD' DEFAULT DATE '2000-01-01',
while executing the SAS program I am getting the below warning.
WARNING: Variable STATUS_CHANGE_DATE not appended because of type mismatch.
Please suggest how I can resolve the warning.
Looks like CASTing the date has converted it to character in the SAS load table. It needs to be a proper SAS date or datetime to load correctly. I suggest you remove the CAST, rerun the download then check the variable type with PROC CONTENTS.
How is STATUS_CHANGE_DATE defined in SAS? Run PROC CONTENTS on your SAS load table and post the output.
Please find the PROC CONTENTS output:
Variable | Type | Len | Format | Informat | Label |
STATUS_CHANGE_DATE | Char | 4000 | $4,000.00 | $4,000.00 | STATUS_CHANGE_DATE |
Looks like CASTing the date has converted it to character in the SAS load table. It needs to be a proper SAS date or datetime to load correctly. I suggest you remove the CAST, rerun the download then check the variable type with PROC CONTENTS.
Thank you @SASKiwi . The warnings are resolved after I removed CASTing during the data fetch.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.