Hi Naomi
I was talking about this on the tek-tips forums yesterday. LIKE() is not ANSI SQL. Use it in VFP where you need to, but in all SQLs use LIKE. Same goes for BETWEEN. In this case SQL LIKE does not accept question marks, but _. Personally, I find it really confusing to mix VFP and SQL syntax in a SQL command.
>Hi everybody,
>
>These two selects produce different results in VFP9:
>
>
>SELECT * FROM phones WHERE cArea_Code+cExchange+cLast_four like '???6948400'
>SELECT * FROM phones WHERE LIKE('???6948400',cArea_Code+cExchange+cLast_four)
>
>First doesn't return records. The second returns 2 records.
>-------------------
>It's because LIKE operator uses __ instead of ?.