djridge100
New member
- Local time
- Today, 22:26
- Joined
- Oct 27, 2008
- Messages
- 3
Hi,
I have a table called Customer_Subscriptions (sample data for this table is shown below).
Customers_ID Journals_ID
M31987 EJTH
M31987 ETHM
M31987 EVAN
M42546 SCCB
M42546 TRAN
I have the following SQL query to show journals that a customer subscribes to:
SELECT Journals_ID
FROM Customer_Subscriptions
WHERE Customers_ID="M31987" AND Journals_ID In ("BARR","CUEN","TRAN","SCCB","ETHM","EVRT","EVQU","EJTH","EVAN");
This would return:
Journals_ID
EJTH
ETHM
EVAN
How would I write a query to return the opposite, e.g the journals they don't subscribe to:
Journals_ID
BARR
CUEN
TRAN
SCCB
EVRT
EVQU
Thanks in advance,
Richard.
I have a table called Customer_Subscriptions (sample data for this table is shown below).
Customers_ID Journals_ID
M31987 EJTH
M31987 ETHM
M31987 EVAN
M42546 SCCB
M42546 TRAN
I have the following SQL query to show journals that a customer subscribes to:
SELECT Journals_ID
FROM Customer_Subscriptions
WHERE Customers_ID="M31987" AND Journals_ID In ("BARR","CUEN","TRAN","SCCB","ETHM","EVRT","EVQU","EJTH","EVAN");
This would return:
Journals_ID
EJTH
ETHM
EVAN
How would I write a query to return the opposite, e.g the journals they don't subscribe to:
Journals_ID
BARR
CUEN
TRAN
SCCB
EVRT
EVQU
Thanks in advance,
Richard.