Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Get Count From Two Tables
Message
 
 
À
16/06/2008 11:28:46
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01324438
Message ID:
01324441
Vues:
16
This message has been marked as the solution to the initial question of the thread.
>I have two tables in which I keep Employee records one has direct employees the other contractors. They both have same field structure. I need to total count of records from both tables combined. These are remote tables an I access then with SPT.
>
>I have tried UNION ALL but this gives me two records, the count from each table.

Use it as derived table to get Total
SELECT SUM(counts) FROM (
  SELECT SUM(...) ...
  UNION ALL
  SELECT SUM(...) ...
) dt1
--sb--
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform