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 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 384 views
  • 1 like
  • 2 in conversation