WarcraftPlayer
MIS
I know I would do this with code but i was hoping I could do it in a procedure.
I have a table
TableID Payer State EffectiveDate ExpirationDate
1 MC FL 7/28/2004 7/28/2005
2 RC TX 8/26/2004 3/28/2005
3 M TN 3/28/2004 12/28/2005
4 MC FL 6/28/2004 6/28/2005
Sometimes Ill have a need to query by mulitiple states maybe 25 of them. So instead of doing a query like this
Select * from Table where State = xx
and have the code loop through it. I was hoping to pass a string of states in say "FL,TX,MD,TN,AR". Split that up and loop through but I cant seem to figure out how to make it work.
Thanks for any help.
I have a table
TableID Payer State EffectiveDate ExpirationDate
1 MC FL 7/28/2004 7/28/2005
2 RC TX 8/26/2004 3/28/2005
3 M TN 3/28/2004 12/28/2005
4 MC FL 6/28/2004 6/28/2005
Sometimes Ill have a need to query by mulitiple states maybe 25 of them. So instead of doing a query like this
Select * from Table where State = xx
and have the code loop through it. I was hoping to pass a string of states in say "FL,TX,MD,TN,AR". Split that up and loop through but I cant seem to figure out how to make it work.
Thanks for any help.