In an outer join query, if the user enters a value in a paramter, it returns all of the records. What I would like it to do is to return only the rows that match the entered value. If 'ALL' is entered, return all rows. Is there a way that I can reconstruct my query to do this?
NOTE: We have function that decodes the value entered by the user, if the user enters ALL the function returns %. If they enter a value it returns the entered value.
See the atached query