Need help with the following:
tableA has c_key that looks like hhh-123456789 where tableB has cid like 123456789. I need to remove the first four (hhh-) from the c_key in tableA so that I can join on cid in tableB. I did a substr but I am getting the following error:
proc sql;
create tableC
select a.*,
b.pl_svc as svc,
b.grp_cd as grp,
substr('c_key',1,5) AS a.cid
-
22
76
ERROR 22-322: Syntax error, expecting one of the following: a quoted string, ',', AS, FORMAT, FROM, INFORMAT, INTO, LABEL, LEN,
LENGTH, TRANSCODE.
ERROR 76-322: Syntax error, statement will be ignored.
from tableA a
LEFT JOIN tableB as b
on a.cid = b.cid
quit;
... View more