Hi All, I getting the Spool space error on Teradata while I'm trying to extract data for a month, so I am trying to spilt the date in an interval of two weeks and extract the data. i am thinking of spitting the data like strtdate - '2022-04-01' enddate = '2022-04-16' but not sure how to calculate the next start date and end date. Kindly Note that the data will be always extracted for the previous month. Please suggest if i need to compare the Strtdate and create a new macro variable and use it the query. or use a do loop to achieve this. data _null_;
date = today();
a = intnx('month', Date, 0, 'B');
B = intnx('month', Date, 0, 'E');
CALL SYMPUT (CATS('C'),QUOTE(PUT(INTNX('day',A,0),yymmdd10.),"'"));
CALL SYMPUT (CATS('D'),QUOTE(PUT(INTNX('day',A,15,'E'),yymmdd10.),"'"));
put a = date9. B = date9.;
run;
%PUT &C. &D.;
%syslput C= &C.;
%syslput D= &D.; Regards, Santosh
... View more