Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Network:
Windows 2008 Server
>>>>>>The code works well EXCEPT that please look at the following code that generates all the OR conditions:
>>>>>...
>>>>>>I'm getting an error that the SQL statement is too long, probably because there are so many fields to process. How can I solve this?
>>>>>
>>>>>Split that after some number of fields and build three, four cursors (or as many as it takes), so that the field list for each one of them is short enough. Then select... union them into one, assuming you don't have any memos in there.
>>>>
>>>>That part is easy. Thanks. HOWEVER, this solution will leads to duplicate records if, say, fields #5 do not equal and ALSO fields #88 do not equal if the 2 fields are dealt with in different cursors.
>>>
>>>UNION will remove duplicate rows, UNION ALL will have the undesired effect you mention.
>>Thanks! That worked.
>
>Sorry I forgot to mention that bit... I've burned my fingers on the difference so many times that now for me it goes without saying.
No problem. Thanks!
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement