I have a question for you. Is there a chance to create a macro something similar to this, but in prco sql in quera where it always selects the first day and the last of the month.
%let thismonth=%sysfunc(putn(%sysfunc(today()),yymmn6.));
where t1.DATE = &thismonth
and _dly. between t2.data_from and t2.data_to
and &gv_date_dly. between t3.data_from and t3.data_to
and t3.obj_code not in ('G07','N06','N07')
where we have date from to be recalled from the 1st day of the month and date_to to the last day of the month when the function & thismonth was called
Defining the first / last day of current month:
%let first = %sysfunc(intnx(month,%sysfunc(today()),0,b));
%let last = %sysfunc(intnx(month,%sysfunc(today()),0,e));
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments