Link to home
Create AccountLog in
Avatar of Castlewood
Castlewood

asked on

INLIST(LEFT(fcolor,3), "WHI","BLU","RED") ?

I want to get a list of parts with the selected colors. In Foxpro, without using 'OR', the command looks like:

SELECT partno from inmast;
where INLIST(LEFT(fcolor,2), "WH","BL","RE","AB","GF")

How to accomplish this in SQL?
ASKER CERTIFIED SOLUTION
Avatar of BrandonGalderisi
BrandonGalderisi
Flag of United States of America image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
An alternative which may yield a seek would be:


SELECT partno from inmast
where fcolor like 'WH%'
  or fcolor like 'BL%'
  or fcolor like 'RE%'
  or fcolor like 'AB%'
  or fcolor like 'GF%'