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:
00969262
Views:
7
>Hi. SQL is really giving me a difficult time. Currently, I am trying to
>"Select all of A" + "only the items in B that are not already in A".
>
>Can anyone help?
>
>Thanks, Randy

Assuming the structures of tables A and B are the same, or at least the fields selected from A and B are the same datatypes:

select * from A
union
select * from b where id not in (select id from a)
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform