|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
I have 3 tables:
1. customer_order c 2. external_customer_order e 3. external_invoice_header h I want to get all the information in c for the orders that exist in c but do not exist in e and h (key for all records is order_id). Does anyone has a suggestion about how to do this? Thanks! |
|
#2
|
|||
|
|||
|
Solved
I solved this one with exists:
SELECT * FROM customer_order c WHERE NOT EXISTS (SELECT * FROM external_customer_order e WHERE e.order_no = c.order_no) for some reason my other query with 'NOT IN' didn't work. If anyone can tell me why...be my guest :S select * from customer_order c where c.order_no not in (select order_no from external_customer_order) But problem solved anyway ![]() |
![]() |
| Viewing: ASP Free Forums > Database > SQL Development > Query - General - Get records that exist in only in one table and not in other linked tables |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|
|
|
|