Im stuck and need some help, I have 3 out of 4 variables working in my Where clause and need help getting the 4th one to work. My variables are @startdate, @enddate, @class, @STdrp.
The date range works fine and when I filter for @class that works as well, but the @STdrp when I choose something there it returns those results, but everything else as well. How can I just get back what was passed as @STdrp?
Im sure the way I wrote this is pretty messy, my apologies Im not as good on the back end as I am the front end.
ct.AlertedDate between @startdate and @enddate
ct.[Dispo] = @STdrp
ct.[AcceptStatus] = @STdrp
-- @STdrp = '%'
isnull(QC.Class,'BB') like @class
@startdate <= ct.AlertedDate
ORDER BY ct.[AlertedDate]
Thanks for your advice.