>With a table named mytable that has character, numeric, logical and memo fields
>
>cSQL = “SELECT * DISTINCT FROM mytable where field1 like ‘%hello%’ INTO CURSOR myquery”
>&cSQL
>
>in this case field1 is a character (50) field.
>
>It works on VFP 6 and 7 but in VFP8 it returns error 34 on the &cSQL line
>
>After toying with it a little I found that removing the clause DISTINCT from the command it works just fine in VFP 8
>
>cSQL = “SELECT * ROM mytable where field1 like ‘%hello%’ INTO CURSOR myquery”
>&cSQL
>
>So the questions are:
>
>Is this an intended behavior or is a bug?
Intended behavior. The help file explains that this is because you have Memo fields in the query. It's listed under "Behavior changes since VFP 7".
>If it is intended how to avoid duplicate records on the result query?
I think I've seen people get around it by using PADL on the memo field, so it comes in as a string. I'm not entirely sure, though.