Hi all, seeking help on the coding below.
I would like to set %let statement to read the period equal to 2 months after begin date. (i.e. 202304)
If i direct set period_YM = 202304, the program is works. However, instead of direct set the period_YM, i would like to build a %let statement to calculate in future.
But, the error pop up as below. Would like to seek any solution to solve this issue?
ERROR: CLI describe error: [Oracle][ODBC][Ora]ORA-00907: missing right parenthesis : [Oracle][ODBC]Invalid descriptor index <1>.
%let begin = 202302;
%let period = "%sysfunc(intnx(month,%sysfunc(inputN(&begin.01,yymmdd10.)),+2),date9.)"d;
%let period_YM = input(substr(put(&period., yymmddn8.),1, 6), 6.);
Proc sql;
CONNECT TO ODBC (DATAsrc=KPODA01 USER=&OD_USER_ID PASSWORD=&OD_PASSWORD);
CREATE TABLE working.output as select * from connection to ODBC
(select distinct
Column 1,
Column 2
from oracle.File_Name_&period_YM.);
Thanks in advance!