- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 02-16-2017 09:51 PM
(1239 views)
Any idea to correct the syntax below?
PROC SQL;
UPDATE TABLEA
SET NAME='',ACCOUNT=''
WHERE ID =(SELECT ID FROM TABLEB WHERE AMOUNT LE 0);
QUIT;
I GOT THIS ERROR MESSAGE: ERROR: Subquery evaluated to more than one row.
Many Thanks.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Without having the data to prove the code on, this might work:
PROC SQL;
UPDATE TABLEA
SET NAME='',ACCOUNT=''
WHERE ID in(SELECT distinct ID FROM TABLEB WHERE AMOUNT LE 0);
QUIT;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
WHERE ID IN (SELECT ID FROM TABLEB WHERE AMOUNT LE 0); QUIT;