One way to accomplish this would be to setup a SQL Query Service with an input parameter (in the example below named whereClause):
Not exactly understanding 100% what you are describing I should do.
Is there anyway I can put on if statement in the query such as
if [[Shift]] = '' then
DECLARE Shiftinput = "and Shift = [[Shift]]"
DECLARE Shiftinput = ""
basically stating if the user has put a value into the input for "Shift" then add the where clause on to the end of the query designated by the variable "Shiftinput" otherwise don't add the where clause on the end of the query by having the variable "Shiftinput" which is at the end of the query statement to be equal to nothing?