Currently I am working with iBatis with Oracle 10g as the backend. I
a number of jsps or Web pages which take various input parameters in the
sqlmap, there is a complex join involving nested SELECT statements. The
nesting works fine as one of them is used for grouping a result set of no
500 rows at a time. This works fine.
The main problem with the sqlmap is that part of the SELECT statment
a composite join between three Oracle tables/views. By using the backend
TOAD, I can see all the individual columns and data, so there is no issue
The problem I am facing is a subtle one. Throughout my
are various queries involving wildcard searches with the input parameters.
there is a query involving a single table, the wildcard parameter like qu*
return the result set with the values quit, queer, question quintessence,
When I use the wildcard with the multiple joins and there are logical
to the joined tbales, the query returns back an empty set. What gives ??
Someone had suggested using an Oracle bind variable instead of using
literals. How would this impact the existing syntax? A simpler version of this
code snippet involves no joins between tables and views and the wildcard feature
Here is the code snippet.
SELECT * FROM ( SELECT /*+ FIRST_ROWS(500) */
B.*, ROWNUM RNUM
AND TT.TXN_TYPE =
TT.DESCRIPTION LIKE #TC_DESCR#
TT.DESCRIPTION = #TC_DESCR#
ORDER BY TXN_CODE
WHERE ROWNUM < #ROW_TO_END# )
WHERE RNUM > #ROW_TO_START#
I look forward to any input from the iBatis user community.
Mason Yu Jr.
June 18, 2008 12:46 PM
June 18, 2008 1:02 PM