Writing a query with 3 parameters that it needs to meet.

Writing a query with 3 parameters that it needs to meet.  I have a temp table that I pull from, then apply the 3 parameters.  Select all is an option in two of the three params.  I'm attaching the query that I have so far.  I can get it to meet all three, but get nothing if 'all' is selected.  I also need to make the instructor field optional on the SSRS report.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott PletcherSenior DBACommented:
What values are the params set to to indicate 'ALL'?  0? -1?
SherryDeveloperAuthor Commented:
They are set to use 0
Scott PletcherSenior DBACommented:
SELECT InstructorID, InstructorName
FROM #Instructors
WHERE (@Facility = 0 OR FCRLAS_ID = @Facility)
      AND (@Location = 0 OR RPMLCD_CD = @Location)
      AND (@Reason = 0 OR RPMPGM_ID = @Reason)

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

SherryDeveloperAuthor Commented:
I did this.  I'm going to check with a business person to make sure I have a good selection for the parameters so I would be sure to get a list of names.  So far, I get none.  and the report won't run without selecting an instructor.   I'll let you know.  Thanks Scott
SherryDeveloperAuthor Commented:
I'm going to have to wait until Monday to complete this.  There's an issue with the database.  The programs matching to the instructors, doesn't match up with the list of programs for facility, location and program/reason.
Scott PletcherSenior DBACommented:
I believe my comment as linked below should be the solution

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft SQL Server

From novice to tech pro — start learning today.