Link to home
Start Free TrialLog in
Avatar of json123
json123

asked on

Building Query dynamically in ibatis

I need help with this specific scenario, I need to execute sql based on user selection. When user selects multiple conditions I need to build the query by addign multiple and, or conditions to the SQL. How can I do this using ibatis? Should I create sql statements for every possiblity and execute? or can we put this conditions into a variable and pass that to substitute in the SQL ? I hope there should be some better way. If any one point me into the right direction then that would  be a great help. Please explain to me in detail..

Thanks
ASKER CERTIFIED SOLUTION
Avatar of mrcoffee365
mrcoffee365
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of json123
json123

ASKER

Thanks a lot for your prompt reply.
I found  out that I can really generate sql statements dynamically to execute it. It is pretty flexible and worked real good.
Thanks



Glad to help.
Forced accept.

Computer101
EE Admin