Hi all,
Sorry if this is in the wrong forum...wasn't really sure where to put it. Also, sorry for the poor title...I wasn't sure how to describe this succinctly. :\
Anyway, I have a database that, among others, has these two tables (I hope I'm explaining this well enough):
Table: Statuses
Row: ID, StatusName
i.e.:
1, TBD
2, In Progress
Table: CurrentTestStatus
Row: ID, TestSet_1, Status_ID_1, TestSet_2, Status_ID_2
i.e.: 1, SQL, 1, Pro-ISAM, 2
I also have a web page, with a DataGridView that displays CurrentTestStatus...Like this:
ID, TestSet_1, StatusName, TestSet_2, StatusName
i.e.: 1, SQL, TBD, Pro-ISAM, In Progress
The problem I'm having is:
If Status_ID_1 and Status_ID_2 match, my data for that TestStuatus ID is returned in one row.
i.e.: 1, SQL, TBD, Pro-ISAM, TBD
If Status_ID_1 and Status_ID_2 do not match, my data is returned in two rows.
i.e.:
1, SQL, TBD
1, Pro-ISAM, TBD
No matter what tinkering I do with the queries, I always get two rows when the Status ID's don't match.
How can I get the data to be returned in 1 row every time?
Chris
- Edited by Chris Shenar Friday, September 11, 2015 6:01 PM