I meet a very confusing problem when code SQL in SAS. My code is:
proc sql noprint;
select VDte into :vdate
create table test3 as
select *, cdate>=&vdate. as index
If your VDte has a SAS date format, you need to "clear" it before storing its value to the macro variable:
proc sql; select VDte format=8. into :vdate from test1; quit;
Then your comparison should work fine.
Note that you could also use the date9. format for creating your macro variable and then use
cdate>="&vdate"d in your second query.