Hi @JBailey Thanks for your reply
I do not know the data types, because i used DI as interface the data types shown is either character or numeric, but i will try to look further.
The DI jobs consist of 2 transformations, an Extract and a table Loader.
The code filled with many DI generated codes and macro but the code goes like :
%include "....../autoexe.sas"
%include "...../deletedate.sas" /*precode for delete date macro*/
%include "....../bussiness_date.sas" /*precode to get bussiness date*/
/*this is extract transformation*/
proc datasets lib=work nolist nowarn memtype = (data view);
delete worktable;
quit;
proc sql;
create view worktable as
select ID, bussines_date, Outstanding, balance
from Output.sourcetable
where business_date="&cur_bussinessdt"d;
quit;
/*end of extract transformation*/
/*table loader transformation*/
LIBNAME WBLIB SQLSVR Insertbuff=#### Schema=dbo AUTHDOMAIN="MSSQLAuth";
%DeleteCurrentDate(WBLIB, SQLTabble, Bussiness_date);
*macro to delete data with current date if any;
%let previousSQLtable=SQLtable;
data WBLIB.SQLtable; set worktable;
attrib ID length=$50 informat = $CHAR50.
format = $CHAR50.;
attrib bussiness_date length=8 informat = date.
format = DATE9.;
attrib Outstanding length=8 informat = 21.2
format 21.2;
attrib balance length=8 informat 21.10
format 21.10;
run;
proc append base = WBLIB.SQLtable
data = previousSQLtable force;
run;
... View more