arianhojat Posted October 2, 2007 Share Posted October 2, 2007 i have 4 variables that if they are set like so in Query via parameters: HAVING (Clients.Fname=$P{FirstName}) AND (Clients.Lname=$P{LastName})AND (WIP.Wipdate Between $P{StartDate} And $P{EndDate}) but would like it to be smart and only build certain parts of query if parameter is set to something other than null. so if $P{FirstName} and $P{LastName} are set then the HAVING Clause will only have... HAVING (Clients.Fname=$P{FirstName}) AND (Clients.Lname=$P{LastName}) if just $P{StartDate} and $P{EndDate}then HAVING(WIP.Wipdate Between $P{StartDate} And $P{EndDate}) if none, then no HAVING clause at all. Any good ways to approach this? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now