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
Titre:
Need Help With SQL
Divers
Thread ID:
00579145
Message ID:
00579145
Vues:
54
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
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform