|
The syntax isn't correct; that's why you're getting a message. There is
an example in the PROC SQL documentation. At a minimum, you must
provide an expression immediately after the CASE keyword, and a THEN for
each WHEN. It's a good idea to provide an ELSE clause and a name for
the the result. Something like
case 1
when cext0303 ne 'Z' then 1
else 2
end as myresult
It would help if you had posted the actual error message insted of
making us guess what it might be. You might also save some time by at
least glancing at the documentation before you ask a question - the
documentation is pretty clear about what a case expression must look
like.
--
JackHamilton@FirstHealth.com
Manager, Technical Development
Metrics Department, First Health
West Sacramento, California USA
>>> "Nicole B" <nicole.d.bibb@WELLSFARGO.COM> 06/08/2004 10:08 AM >>>
Not sure why this sql is not working correctly. I keep getting an
error
msg on the case statement.
proc sql;
create view basel.join&date as
select * , case when cext0303 not eq 'Z' end
from worktst.mus&date left join worktst.mus&perdate
on mus&date..acc_id=mus&perdate..acc_id;
quit;
proc freq data=basel.join&date; table cext0303 / missing list;
proc print data=basel.join&date (obs=10);
title "MERGED OBSMTH AND PERFMTH";
run;
|