Here is a problem that I am facing.
My parameter class has two counts, say countA and countB and I need to use these in a ‘HAVING’ clause in the sql query. Both the values could be empty. For eg. if they both have values, the query would look like:
Select …. --- from… where…. HAVING ( countA > 5 and count B < 10 )
I tried using nested dynamic clause, but looks like it is not supported. <dynamic prepend="HAVING"> ( <isNotEmpty property="countA"> count > #countA# </isNotEmpty>
<dynamic prepend="AND"> <isNotEmpty property="countB"> count < #countB# </isNotEmpty> </dynamic> ) </dynamic>
Is there any other approach to solve this problem, other than going thru and checking every combination of countA and countB ? Any help/suggestion is appreciated
Thanks, Prasad
-- |
- Re: Question on dynamic prepend and using multiple proper... Narasimha Prasad
- Re: Question on dynamic prepend and using multiple p... Ron Grabowski
- Re: Question on dynamic prepend and using multip... Brandon Goodin