Desktop productivity for business analysts and programmers

enterprise guide 3.0 filtering multiple columns with logical operators

Reply
N/A
Posts: 0

enterprise guide 3.0 filtering multiple columns with logical operators

I cant figure out in 3.0 how to filter several different columns with the logical operator 'OR'...
SAS Super FREQ
Posts: 8,818

Re: enterprise guide 3.0 filtering multiple columns with logical operators

Hi:
I no longer have EG 3.0 to test specifically. But in general, SAS expects OR conditions to be specified in one of 2 ways:
[pre]
if jobcode = 'PILOT' or jobcode='BAGCLK' or jobcode = 'FLTAT' . . .

if jobcode in ('PILOT', 'BAGCLK', 'FLTAT') . . .
[/pre]

So, if you are trying to select something that would look like this:
[pre]
if jobcode = 'PILOT' or 'BAGCLK' or 'FLTAT' . . .
[/pre]

Then EG would probably be unhappy. If you are using different columns, then the syntax would be similar:
[pre]
if jobcode = 'PILOT' or salary gt 50000 . . .
[/pre]

For help with the exact click path to get an OR condition in EG 3.0, you might consider contacting Tech Support.

cynthia
Ask a Question
Discussion stats
  • 1 reply
  • 94 views
  • 0 likes
  • 2 in conversation