I have a query that i cannot get quite right while using MS report builder 3.0 pulling from a SQL 2012 db.
SELECT * FROM regtesters.dbo.resreg reg
WHERE(reg.regNumber = @regNumber OR @regNumber = '')
AND(reg.ersNumber = @ersNumber OR @ersNumber = '')
I want to be able to search by either variable. Using the AND i get no results and if i use an OR i get the entire table. I need help to figure out the correct syntax.