I am writing a query on the following table.
Let's forget the syntax and concentrate on the function.
I am customer number 2 and I want to make a list of the magazines I subscribe to and other magazines available.
will give me
Now I want to carry on the list with the rest ie.
How can I avoid the duplicates and end up with the following list.
I can achieve this with code but is it possible in 1 single SQL statement?
Keith
Let's forget the syntax and concentrate on the function.
Code:
cust magazines
1 4
1 5
2 4
2 6
3 5
3 6
Code:
SELECT * WHERE CUST=2
Code:
2 4
2 6
Code:
SELECT * WHERE CUST <> 2
1 4
1 5
3 5
3 6
Code:
Subscribe
4
6
Not Subscribed
5
Keith