Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to simplify SQL statement
Message
De
31/08/2004 05:46:43
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00937299
Message ID:
00937927
Vues:
6

I am running into the "SQL too complex" error. I think because the SQL statement can't be longer than something (probably 254K).

Here is a segment of the SQL I am trying to create:

select iif(EQ1,EQ1NAME+";","") + iif(EQ2,EQ2NAME+";","") + ;
iif(EQ3,EQ3NAME+";","") AS EQLIST FROM MYTABLE

The problem is that I have 16 of the IIF() statements (that it, EQ1 to EQ16) in the SQL Select.

Any suggestions on how to get around this limit of SQL or simplify my statement?

Thank you.


The documentation of SYS(3055) is mistaken.

Use this:
SYS(3055,2040) && without the complete SELECT command, i cannot put the exact value for nComplexity
select LEFT(iif(EQ1,EQ1NAME+";","") + iif(EQ2,EQ2NAME+";","") + ;
iif(EQ3,EQ3NAME+";","")+....,254) AS EQLIST FROM MYTABLE
Of course, with 16 fields, the max lenght for EQNAME is 14.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform