I have a stored procedure that looks similar to the one below:
Expand|Select|Wrap|Line Numbers
- Select * from
- table a
- inner join
- table b
- on
- a.id = b.id
- inner join
- table c
- on
- b.id = c.id
- AND
- (a.value = b.value
- OR
- a.value = c.value
- OR
- b.value = c.value)
#temp would be a temporary table with columns id and match
select * from #temp
If it only matched on a
( (1), ("a") )
if it matched on a and b
( (2), ("a,b") )
if it matched on all three
( (3), ("a,b,c") )
and so on...
If anyone has a good example of a stored procedure with such functionality that would be very helpful.
Thanks