Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Any alternative ways for this SQL statement?
Message
De
18/07/2000 02:47:05
Walter Meester
HoogkarspelPays-Bas
 
 
À
18/07/2000 02:33:19
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00393654
Message ID:
00393659
Vues:
32
Hi John,

Does it have to be a single SQL statement. The best (and easiest) thing to do is to store the inner SELECT into a cursor and querie the outher one on the cursor like:
SELECT SUM(addlog.tran_bal) AS TTotal, SUM(0) AS PTotal
    From Addlog ;
UNION ;
SELECT SUM(0) AS Total,  SUM(eftlog.tran_bal) AS PTotal
    FROM eftlog ;
    INTO CURSOR x

SELECT SUM(TTotal), SUM(PTotal)
    FROM x ;
    INTO CURSOR Result
Walter,
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform