Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL syntax question
Message
 
To
14/12/2004 15:51:48
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP1
Network:
Windows 2000 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00969260
Message ID:
00969765
Views:
9
I believe you can use the following (I am not on a machine with VFP so syntax may be a little off but this is the technique)

assumes following:
1. both a and b have same or similar fields if only similar then would have to request fields rather than use *

2. there is a key value common to both a and b call it x

then can create following sql:

select * from a ;
union ;
select * from b where not x in (select distinct x from a)

Please check above against the valid VFP syntax but that will retrieve all fields in a and all fields in b where x is in b but not in a.
Previous
Reply
Map
View

Click here to load this message in the networking platform