From: dc353 on
I have a large dataset (66 million rows) indexed on dt which is a
datetime numeric. I have a macro variable &mdt = 01JAN1986:00:00:00

When I run my query:

Proc sql;
select *
from x
where dt = "&mkt"dt;quit

it works but takes over a minute and a half to run.

if I replace &mkt with '01JAN1986:00:00:00'DT it runs in a couple of
seconds.

I've tried both %let mkt = %bquote('&mkt') and %str(%'&mkt%') but this
doesn't seem to work either.