Hey Brandon,
I downloaded your latest build and tried using ?[]? While passing a
ListArray, but I am getting the following error:
Cause: java.sql.SQLException: ORA-01729: database link name expected
Any ideas?
Thanks!
Sam
<select id="queryInterfaceBacklogs_DUAL" parameterClass="java.util.List"
resultMap="interface_backlog_result"
cacheModel="interface_backlog_cache">
select
interface_name as SYSTEM_NAME,
sum(backlog_val) as BACKLOG_VAL,
sum(backlog_last1) as BACKLOG_LAST1,
sum(backlog_last2) as BACKLOG_LAST2,
sum(backlog_last3) as BACKLOG_LAST3
from
(
<iterate open="(" close=")" conjunction="UNION ALL">
select
a.interface_name,
sum(decode(i.BACKLOG_VAL,'',0,i.BACKLOG_VAL)) as BACKLOG_VAL,
sum(decode(i.BACKLOG_LAST1,'',0,i.BACKLOG_LAST1)) as
BACKLOG_LAST1,
sum(decode(i.BACKLOG_LAST2,'',0,i.BACKLOG_LAST2)) as
BACKLOG_LAST2,
sum(decode(i.BACKLOG_LAST3,'',0,i.BACKLOG_LAST3)) as
BACKLOG_LAST3
from INTERFACE_STATUS i,
( select distinct interface_name
from [EMAIL PROTECTED]
where category='Provisioning'
)a
where SYSTEM_NAME is not null
and a.interface_name = i.system_name
group by a.interface_name
</iterate>
)
group by interface_name
</select>
from INTERFACE_STATUS i, ( select distinct interface_name
from [EMAIL PROTECTED] where category='Provisioning'
)a where SYSTEM_NAME is not null and a.interface_name =
i.system_name group by a.interface_name ) )
group by interface_name
2005-04-18 11:23:26,118 [HttpRequestHandler-74] DEBUG
java.sql.PreparedStatement - {pstm-100007} Parameters: []
2005-04-18 11:23:26,118 [HttpRequestHandler-74] DEBUG
java.sql.PreparedStatement - {pstm-100007} Types: []
2005-04-18 11:23:26,769 [HttpRequestHandler-74] DEBUG
com.ibatis.common.jdbc.SimpleDataSource - Returned connection 169 to
pool.
2005-04-18 11:23:26,779 [HttpRequestHandler-74] ERROR pmt.BaseDAO.class
- Exception caught in performDualQuery
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred while applying a parameter map.
--- Check the queryInterfaceBacklogs_DUAL-InlineParameterMap.
--- Check the statement (query failed).
--- Cause: java.sql.SQLException: ORA-01729: database link name expected
Caused by: java.sql.SQLException: ORA-01729: database link name expected
at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQuery
WithCallback(GeneralStatement.java:180)
-----Original Message-----
From: Brandon Goodin [mailto:[EMAIL PROTECTED]
Sent: Monday, April 18, 2005 10:16 AM
To: [email protected]
Subject: Re: Is there a way to remove the quotation marks that ibatis
inserts when using #[]# on the <iterate> tag?
Sam,
$[]$ should work. I tested it this weekend and it worked fine.
Brandon
On 4/18/05, Abeyratne, Sam <[EMAIL PROTECTED]> wrote:
> Hi Brice,
>
> That does not work. Simply because I am passing a list array. And for
a
> List the ibatis syntax is #[]#. I tried doing something like #?[]?#
but
> that does not work.
>
> Thanks!
> Sam
>
> -----Original Message-----
> From: Brice Ruth [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 15, 2005 6:32 PM
> To: [email protected]
> Subject: Re: Is there a way to remove the quotation marks that ibatis
> inserts when using #[]# on the <iterate> tag?
>
> use $ in place of the #, that way it won't be quoted.
>
> On 4/15/05, Abeyratne, Sam <[EMAIL PROTECTED]> wrote:
> >
> >
> >
> > I want to use the <iterate> tag to create an sql statement.
> >
> >
> >
> > If I have something like [EMAIL PROTECTED] and the first value in the
> list for
> > example is database1, it really translates to
table_name@'database1'.
> This
> > fails because of the single quotes. Is there a way to remove these
> single
> > quotes? Meaning, translate [EMAIL PROTECTED] to [EMAIL PROTECTED]
> >
> >
> >
> > Any assiatnce would be much appreciated!
> >
> > Thanks!
> >
> > Sam
>
> --
> Brice Ruth
> Software Engineer, Madison WI
>
>