troubleshooting Question

How To check multiple properties using isNull or isNotNull in ibatis sqlmap?

Avatar of inditrozen
inditrozen asked on
Programming Languages-OtherProgrammingSQL
1 Comment1 Solution4107 ViewsLast Modified:
Hi All,

In iBatis SQLMap,select, I need to check more than two parameters for isNull. Is it doable?

In example if parameter id and lastname (both) are not supplied then use first name in query.
Please see example below.
Example 1
        select * from employee
         where
         <isNull property="id" and property="lastname">  Can I write something like this?
             and firstname=#firstname#
         </isNull>

Is it possible? Can I check more than one properties for null and put depending clause in SQL?

TIA
Regards


         
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 1 Comment.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 1 Comment.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros