Ultimatly this is for a .Net application that requires an SQL statement or stored procedure,
I have a single table that has two Fields.
Both of these together are unique for a single record. So a typlical data set looks like this
My application requires me to list ALL of the CategoryName and identify which ContactServiceID has an association. So a result for me entering the ContactServiceID of 3 (using the above example data set) would return the rows:
green <null> (Prefer it enter 0 as this is better to code for)
So I thought I would create a select distinct for a single list of all of the CategoryName's and save it as a view then create a join that filtered only the number 3 ContactServiceID, but I am only getting the two records that have the "3" I need ALL of the other possible CategoryNames.
I hope someone could help with this Query. I don't have to use the View as long as the end result table is how I need it. I would much rather use a single table than have to create a View, but either if fine.