I have a simple update query that worked in the past but does not now. expects an "=", but i am sure if have it in there. any idea what i am doing wrong?
PROC SQL;
update sasuser.parts as u
set u.part_system = (select sf.Subsystem FROM sasuser.whereused sf where u.pnum=sf.part number)
where missing(u.'part_system'n);
quit;
1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;5556 PROC SQL;57 update sasuser.parts as u58 set u.part_system = (select sf.Subsystem_7376ERROR 73-322: Expecting an =.ERROR 76-322: Syntax error, statement will be ignored.59 FROM sasuser.whereused sf60 where u.pnum=sf.part number)61 where missing(u.'part_system'n);NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.62 quit;NOTE: The SAS System stopped processing this step because of errors.NOTE: PROCEDURE| _DISARM| STOP| _DISARM| 2019-02-20T10:19:54,419-05:00| _DISARM| WorkspaceServer| _DISARM| SAS| _DISARM| |_DISARM| 30830592| _DISARM| 30568448| _DISARM| 13| _DISARM| 13| _DISARM| 0| _DISARM| 14464| _DISARM| 0.000000| _DISARM|0.006735| _DISARM| 1866295194.412948| _DISARM| 1866295194.419683| _DISARM| 0.000000| _DISARM| | _ENDDISARMNOTE: PROCEDURE SQL used (Total process time):real time 0.00 secondscpu time 0.00 seconds6364 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
Use the {i} button to post the log, to avoid loss of horizontal formatting.
I found the error. It is the use of variable names with a space. I thought I fixed that but was not looking closely enough.
Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.