Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Duplicate results from a unioned Select
Message
From
01/09/2000 14:27:48
 
 
To
01/09/2000 13:48:14
John Tomblin
Service Station Systems, Inc.
San Jose, California, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00411880
Message ID:
00411910
Views:
14
Hi John,

The only thing I can see, is you need to group both halves of the select statement.

select Field1, sum(Field2) from Table;
where Field3 ! = "XXX";
group by Field1;
union select Field1, sum(Field2) from Table2;
where Field3 ! = "XXX";
group by Field1

Try this.

HTH
Mike
Previous
Reply
Map
View

Click here to load this message in the networking platform