Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need Help With SQL
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00579145
Message ID:
00579153
Vues:
34
>I have a table, LineItems, which is a one-to-many into Details
>
>The first SQL pulls the LineItems for my pre-determined Where
>clause and works fine.
>
>The second SQL counts records from Details which have a value in AirTime,
>into a 2 column cursor. These counts represent the total number of detail
>items, for any given line item, that are cleared
>
>I need to get the LineItems from the first cursor, 'LineTemp', and
>the counts from the second cursor, 'DetTemp', into a table.
>
>How do I do this?
>
>  SELECT *;
>    FROM LineItems;
>    WHERE &cWhere;
>    INTO CURSOR LineTemp
>
>  SELECT COUNT(DocId) AS NumCleared, BoIdBase ;
>    FROM Details ;
>    WHERE NOT EMPTY(AirTime) AND RecType = "A" ;
>    GROUP BY BoIdBase ;
>    INTO CURSOR DetTemp
>

>
>Note that both of the above SQL's do work, I just need to combine
>the results so that I see the counts as a line item field.
>
>Thanks

Join the two results together on the foreign key
Wayne Myers, MCSD
Senior Consultant
Forte' Incorporated
"The only things you can take to heaven are those which you give away" Author Unknown
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform