I could use some help with the following SQL Select script:
I need to select all the rows from the table conditionally, depending on whether the user ID has already entered data in the second table with the same identifier.
Example:
a) Select all rows from table A for idNumber, where idNumber is not in table B b), but for each idNumber that IS is in TABLE B, still return a row if the specific user ID is not in this row in table B.
TABLE A ======== idNumber|type|Date 1 A 01/01/01 2 A 01/01/01 3 B 01/01/01 4 B 01/01/01 5 B 01/01/01 TABLE B ======== idNumber|type|userID 1 A 0000 3 B 0000 4 B 1111
userID to exclude entries for = 1111
SQL query should return:
idNumber|type|Date 1 A 01/01/01 2 A 01/01/01 3 B 01/01/01 5 B 01/01/01
Apologies for the long thread, but I hope this makes sense.
Thanks so much in advance, ukjezza !!.
source share