Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Combine 2 or more cursors
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00568592
Message ID:
00568741
Vues:
22
Hi Doron,

You can get around this limitation by using macro substitution. Something like
lcFiledLIst = "Filed1, IIF(filed2, ...), .."
lcFrom = "From Mytable"
lcJoin = "JOIN ..."
lcWhere = "Where ...."
lcGroupBy = ...
lcOrderBy = ...

SELECT &lcFiledLIst &lcFrom ;
  &lcJoin ;
  &lcWhere ;
  &lcGroupBy ;
  &lcOrderBy ;
INTO CURSOR ResultCursor
AS you can see the select command is much shorter than 8,192 characters. Just remember that each macro substitution is limited to 8,192 characters also.

>Hi Sergey,
>
>That was not for a specific SQL statement I have developed a query and report
>and engine and trying to solve problems in general. Also you can check this
>link to see how that query engine works: http://www.dfarber.com/query_engine.htm
>
>But if you have some ideas for SQL statement improvement please let me look at
>that. In some cases instead of using long tables names it is possible to have
>an alias with short name, but that’s may not be enough in some cases when there
>are some expression against each field like IIF() and more.
>
< snip >
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform