View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
dchow dchow is offline
external usenet poster
 
Posts: 18
Default InStr used in SQL query

I would like to get all records with TaxID contains "PST". I used the
following WHERE clause but kept on getting SQL string error.

WHERE (InStr(TaxID, ""PST"") < 0)

If I changed it to
WHERE (Right(TaxID, 3) = ""PST"")

then it worked.

What was wrong with my InStr?