I'm having an issue setting up my parameters to inject into a LIKE statement in my code.
For my parameters I have the following setup:
Q1 - PM-B2009M;
Q2 - PM-B2010M;
Q3 - PM-B2011M
Part of my code has:
WHERE
(WO.STA3N = @Site AND
(WO.WorkOrderNumber LIKE '%' +@Quarter+ '%')
Ideally I'd like to set it so that multiple parameter values can be selected and injected into the code instead of writing out:
(WO.WorkOrderNumber LIKE 'PM-B2006M%'
OR WorkOrderNumber LIKE 'PM-B2007M%'
OR WorkOrderNumber LIKE 'PM-B2008M%')
I tried to modify the parameter value statements themselves to include the OR but that didn't work either.
I'd appreciate any insight.