Unanswered: SQL Help - Retrieving rows not in a joining table
I wonder if you can help...
I have a simple setup: 2 tables and a joining table, and want to retrieve a data set showing every possible combination of table A and table B together with whether that combination actually exists in the joining table or not.
channels_items (joining table)
An example of the dataset I want (assuming 2 items and 2 channels, with itemA not being in channelB):
Psuedo code might be something like:
A derived table creating a cartesian product (i.e. using a cross join) of items and channels. Left outer join this derived table to channels_items and then just create a CASE statement to complete your exists column, testing whether or not there is a corresponding row in channels_items.