Hi All, Firstly, i'd like to thanks from now to those who will answer my question. I got the dates that i will use from a table like the 1st query below. Then, i use this macro variable in another query like 2nd query below. However, i cannot run successfully unfortunately. I 've tried many different approach such as altering column data types, datetime conversion... but i couldnt solve. Do you have any idea? 😞 PROC SQL noprint; SELECT /*dhms(CURRENT_BEGIN_WEEK,0,0,0) format datetime.*/ CURRENT_BEGIN_WEEK INTO: CURRENT_BEGIN_WEEK FROM TABLE_A WHERE ORDER = 38; %PUT*****&CURRENT_BEGIN_WEEK.; *LOG; /* %PUT*****&CURRENT_BEGIN_WEEK.; *****20SEP2021*/ PROC SQL; CREATE TABLE DENEME_1617 AS SELECT * FROM TABLE_B (OBS=100) a WHERE a.RZ_TARIHI > &CURRENT_BEGIN_WEEK.; QUIT; *log; /* proc sql; 28 create table deneme_1617 as 29 select 30 * 31 from 32 O_C_OPR.BOSS_REZERVASYON(OBS=100) a 33 where 34 a.RZ_TARIHI > &CURRENT_BEGIN_WEEK.; NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements. NOTE: Line generated by the macro variable "CURRENT_BEGIN_WEEK". 34 20SEP2021 _______ 22 76 ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, *, **, +, -, /, <, <=, <>, =, >, >=, AND, EQ, EQT, GE, GET, GROUP, GT, GTT, HAVING, LE, LET, LT, LTT, NE, NET, OR, ORDER, ^=, |, ||, ~=. ERROR 76-322: Syntax error, statement will be ignored. 35 QUIT; NOTE: The SAS System stopped processing this step because of errors. NOTE: PROCEDURE SQL used (Total process time): real time 0.01 seconds cpu time 0.01 seconds */ /*Date example from table b*/ PROC SQL; CREATE TABLE DENEME_1657 AS SELECT RZ_TARIHI FROM TABLE_B(OBS=1); /*12NOV2010:00:00:00*/
... View more