Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
'Dynamic' SQL
Message
De
23/01/2001 08:03:47
 
 
À
23/01/2001 07:11:42
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00467190
Message ID:
00467203
Vues:
12
Gad,

You could try something like this:

lnResult = 1

*-- first, create individual result sets
DO WHILE

lcResult = "Step" + PADL(lnResult, 6, "0")

DIMENSION laResult[lnResult]
laResult[lnResult] = lcResult

lnResult = lnResult + 1

SELECT FROM INTO CURSOR (lcResult)

ENDDO

SELECT (laResult[1]) && select first result set
USE DBF() AGAIN IN 0 ALIAS "FinalResult" && reopen cursor in read-write mode
SELECT FinalResult

*-- 'assemble' result sets into one cursor
FOR i = 2 TO ALEN(laResult, 1)
APPEND FROM DBF(laResult[i])
USE IN (laResult[i]) && close temp. result set
ENDFOR
Daniel
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform