BookmarkSubscribeRSS Feed
yelkenli
Calcite | Level 5

 

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;
55
56 PROC SQL;
57 update sasuser.parts as u
58 set u.part_system = (select sf.Subsystem
_
73
76
ERROR 73-322: Expecting an =.
 
ERROR 76-322: Syntax error, statement will be ignored.
 
59 FROM sasuser.whereused sf
60 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| | _ENDDISARM
NOTE: PROCEDURE SQL used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
 
63
64 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
 

 

2 REPLIES 2
yelkenli
Calcite | Level 5

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.  

 

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 402 views
  • 0 likes
  • 2 in conversation