Yes I am back again so soon.
I have a checkbox on my page "show retired only" which if it's checked means I want to filter and only show retired people. The page is already letting you enter criteria like first and last name, etc. So let's say I'm searching on first name Marlene. I would get 170 records. But 20 people named Marlene are retired. So if "show retired only" is checked, I would get 20 records not 170.
I have the argument passed to the stored procedure: @bRetiredOnly bit = 0. My WHERE clause so far (pre-seaching for retired people) looks like this:
If I may ask, how do I factor in to look for "tbl.Status = 'R'" if the bit is passed in equal to true?Code:WHERE tbl.FName LIKE '%' + @FirstName + '%' OR tbl.LName LIKE '%' + @LastName + '%' OR tbl.MName LIKE '%' + @MiddleName + '%' OR tbl.Suffix = @Suffix OR tbl.Fax LIKE '%' + @Fax + '%'
Thanks.




Reply With Quote