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
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad to help.
Forced accept.
Computer101
EE Admin
Computer101
EE Admin
ASKER
I found out that I can really generate sql statements dynamically to execute it. It is pretty flexible and worked real good.
Thanks