Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
UNION and WHERE
Message
 
 
To
05/02/2002 07:53:12
Hilmar Zonneveld
Independent Consultant
Cochabamba, Bolivia
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
00615361
Message ID:
00615556
Views:
18
Hilmar,

UNION is a way to combine two independent SELECTs. If you want a WHERE clause on the first select just add it there too.
select (fieldlist) from Table1;
   where (condition1) ;
union ;
select (fieldlist) from Table2 ;
   where (condition2)
condition1 and condition2 can be the same thing.

>It seems to me that (condition) applies only to the second part of the "unionized" query. Is there a way to apply a condition to the entire result set?
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Reply
Map
View

Click here to load this message in the networking platform