Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Is this an intended behavior or is a bug?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00752429
Message ID:
00752432
Vues:
16
This message has been marked as a message which has helped to the initial question of the thread.
>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.
My blog
My consulting page
My home page

Member of the Trim Your Auto-Quote Campaign!
What's another word for thesaurus?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform