Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Select Statement
Message
 
 
To
08/05/2012 08:56:19
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01543288
Message ID:
01543289
Views:
96
This message has been marked as the solution to the initial question of the thread.
>I know this should be simple, but my brain is refusing to cooperate this morning.
>
>I have two tables as follows:
>
>
>TABLE 1
>drwno    revno     jobno   etc...
>
>
>TABLE 2
>drwno     revno      revby     revdate
>
>
>
>I need a select statement that will select all of the records, based on drwno and revno, from Table 2 that are NOT in Table 1.
>
>Any help will be greatly appreciated.
select * from Table2 T2 where not exists (select 1 from Table1 T1 where T1.drwNo = T2.drwNo and T2.RevNo = T1.RevNo)
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform