I have 3 tables within my data base:
- User Table
- Documents Table
- User-ReadDoc Table (Many-to-Many)
At the moment when I select the data from the two tables it will only display what document the user has read. I want to output the full list of documents but output if the user has or hasnt read the document.
In the “User-ReadDoc” table there is a column that specifies this.
Sudo Code Example
SELECT * FROM Documents, User-ReadDoc
It will just display rows saying who has read the document I just want a list so if that data is not there just truent it and place a “null” or a “0”
BTW I’m using SQL Server 2005…
Thanks.
LEFT JOIN is the way to go
plus you should select needed fields only.