BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Jesusismygrace
Obsidian | Level 7

Hi,

I can't get this simple Where statement to work

 

data output.PCE_meds;
set output.RXClaims;
Where SYSCORTFlag ='Y' or BRONCHOFlag 'Y';
run;

 

This is the error that I get when running to the above code:

SYMBOLGEN: Macro variable _EGNOTES resolves to NOTES
SYMBOLGEN: Macro variable _EGSOURCE resolves to SOURCE
31
32 data output.PCE_meds;
33 set output.RXClaims;
34 Where SYSCORTFlag ='Y' or BRONCHOFlag 'Y';
___
22
76
ERROR: Syntax error while parsing WHERE clause.
ERROR 22-322: Syntax error, expecting one of the following: !, !!, &, *, **, +, -, /, <, <=, <>, =, >, >=, ?, AND, CONTAINS, EQ,
GE, GT, LE, LIKE, LT, NE, OR, ^=, |, ||, ~=.

ERROR 76-322: Syntax error, statement will be ignored.

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenKuhfeld
Ammonite | Level 13

Where SYSCORTFlag ='Y' or BRONCHOFlag = 'Y';

 

Add an equal sign in front of the second 'Y'.

View solution in original post

2 REPLIES 2
WarrenKuhfeld
Ammonite | Level 13

Where SYSCORTFlag ='Y' or BRONCHOFlag = 'Y';

 

Add an equal sign in front of the second 'Y'.

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 472 views
  • 1 like
  • 2 in conversation