I have searched and tried so many different things and to me the problem seems to be straight forward.
I have a DataSet that the user can refine by selecting a dropdown of Yes or No - this looks up the database table and pulls out any records where the column value is Yes, the problem is when I look for No - I need this to return all values in the database so where the value is Yes or No.
Can someone please advise?
SELECT * FROM @TestTable Where Show=@Show
I have set up my Parameter and the Avaliable Values are
Yes - with a value of YES
ALL - with a value of IS NOT NULL - this ends up showing nothing
EDIT -
TestTable has 2 Columns Name | Show
Values are:
Name 1 | Yes
Name 2 | Yes
Name 3 | No
Name 4 | Yes
My report has the Parameter @Show whwen the report loads they are to choose to display Permanent staff only - if they select Yes then it would pull out
Name 1
Name 2
Name 4
If they select No i need the report to show
Name 1
Name 2
Name 3
Name 4
SELECT * FROM @TestTable Where (Show=@Show and @Show='Yes') OR (@Show<>'Yes')would that not work? - Adriaan Stander