I have been working with SQL for about a year now and this doesn't seem unreasonable, but I can't figure how to do this...
Lets say I have a record in a table with three columns, an id, columnA and columnB. The row has id 1, columnA = 2 and columnB = 3. I want to issue a select statement like select * from testtable where columnA = 2 OR columnB = 3. Now, if you were to get that recordset you would get that one row. I want to get the row twice, since it matched twice, or I want to create a temp column which returns the number of times that record was matched against. For example, it would return ID - 1, columnA - 2, columnB - 3, matches - 2.
Any suggestions?
Mike
Lets say I have a record in a table with three columns, an id, columnA and columnB. The row has id 1, columnA = 2 and columnB = 3. I want to issue a select statement like select * from testtable where columnA = 2 OR columnB = 3. Now, if you were to get that recordset you would get that one row. I want to get the row twice, since it matched twice, or I want to create a temp column which returns the number of times that record was matched against. For example, it would return ID - 1, columnA - 2, columnB - 3, matches - 2.
Any suggestions?
Mike