Reputation: 41
I have table myTable with field like this
tranType Source
-------------------------------------
RC,RD,RF,RR PB,CM
I want to create stored procedure that use value of tranType and Source as condition in my query
select *
from myTable
where Source = @valSource -- PB (check for each value from Source)
AND tranType = @valTrantype -- RC(check for each value from tranType)
it will check all of the value in that field
Upvotes: 0
Views: 46
Reputation: 107
Please check with following:
select * from myTable
where find_in_set(@valSource,Source)
AND find_in_set(@valtranType,tranType)
Upvotes: 1