Stored Proc, True if True, All if false
Posted by:
Dan Norh
Date: March 08, 2012 09:45AM
I'm trying to create a stored procedure where onw parameter is passed - either TRUE or FALSE.
If I pass TRUE, I only want to see the records where a certain value is true. I got this working using:
SELECT......
FROM.......
WHERE......
AND users.viewcomm = myparameter;
If myparameter = false, I want to see all records regardless of what users.viewcomm is.
But I'm stumped on how to get it to show all if the paramenter is false. I don't know if I need to somehow negate that AND altogher if myparameter = False, or if I put a wildcard in there somehow if myparameter = false, or how to approach it.
Any ideas?
Subject
Written By
Posted
Stored Proc, True if True, All if false
March 08, 2012 09:45AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.