I have a situation where part of my WHERE clause needs to include ((table1.col1 = table2.col1) OR (table1.col1 = 0))
When I execute my query, wherever there is a match (i.e. table1 refers to a row in table 2) then I get a single line of data.
Wherever there is a 0 in table 1 (i.e. no link to table 2) then I get duplicate rows of the data in table1, 1 for each possible record in table2. So how do I structure my syntax?
Or is there a better way?
(My 2 tables - 1 shows reported bugs, and the other shows details on who has been assigned to correct it, if anyone. - As bugs can be reported by anyone, and it needs the P.M to assign a fixer, I cant really change my underlying data, and nor can I have 2 seperate queries, as the manglement wish to have a master view of all bugs, (assigned and not)
Any help greatfully received
K
When I execute my query, wherever there is a match (i.e. table1 refers to a row in table 2) then I get a single line of data.
Wherever there is a 0 in table 1 (i.e. no link to table 2) then I get duplicate rows of the data in table1, 1 for each possible record in table2. So how do I structure my syntax?
Or is there a better way?
(My 2 tables - 1 shows reported bugs, and the other shows details on who has been assigned to correct it, if anyone. - As bugs can be reported by anyone, and it needs the P.M to assign a fixer, I cant really change my underlying data, and nor can I have 2 seperate queries, as the manglement wish to have a master view of all bugs, (assigned and not)
Any help greatfully received
K