Extremely sorry for the late response. Below have trying my level best to show the scenario.
Table1: INPUT TABLE [ORACLE TABLE]
db_nm(VARCHAR2(50),tbl_nm(VARCHAR2(50),load_col(VARCHAR2(50),chk_start(VARCHAR2(50),chk_end(VARCHAR2(50)
store,customer,load_dt,today()-5,today()
store,product,load_dt,today()-10,today()
I have total 250 source tables list to verify.
Table2: OUTPUT TABLE [ SAS Dataset ]
db_nm,tbl_nm,data_availability_check
'store','customer','Y'
'store','product','Y'
Need to write SAS code in below format.
1. I managed to get the MAX(LOAD_COL)=LATEST_DT value in datetime20. format.
2. Now trying in below way.
data table2;
set table1;
if chk_start >= LATEST_DT and chk_end <= LATEST_DT then data_availability_check='Y';
else data_availability_check='N';
run;
Error: CHK_START,CHK_END column values should be Numeric, but it hold Character value.
Note: TABLE1 is in oracle database (ALL COLUMNS are VARCHAR2(50).
TABLE2 is in SAS (Dataset).
Also requirement here is , It's a data check program which verifies given database name and table names should have latest data i.e maximum load date should be between chk_start and chk_end dates, then only we make data flag as 'Y' else 'N'. I hope its helpful. Please help me to convert 'today()' string value into SAS date value using proc sql or datastep, so that I will convert into datetime20. format.
... View more