Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get Count From Two Tables
Message
 
 
To
16/06/2008 11:28:46
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01324438
Message ID:
01324441
Views:
15
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--
Previous
Reply
Map
View

Click here to load this message in the networking platform