On 23/03/06, Larry Meadors <[EMAIL PROTECTED]> wrote:
> Can you post the mapped statement?

Certainly - but it is very simple!

        <statement id="getPayoutOrgData" resultClass="java.util.HashMap">
                SELECT EVENT.EVENTCD,
                        sum(WTRANS.NETSTAMT) AS NET_VALUE
                FROM WTRANS
                        INNER JOIN EVENT
                                ON WTRANS.EVENTCD = EVENT.EVENTCD
                WHERE WTRANS.TRX_TYPE='S'
                        AND WTRANS.[FUNCTION]=1
                        AND #shows#
                GROUP BY EVENT.EVENTCD, EVENT.NAME
                ORDER BY EVENT.NAME
        </statement>

I am querying with:

        Map filters = new HashMap();
        filters.put("shows", shows);
        List ret = getSqlMap().queryForList(
                    "getPayoutOrgData",
                    filters);

shows is a string of the following format: (it is dynamically created
and can be quite long, but the example which is falling over has just
one entry)
(WTRANS.EVENTCD="ABC" OR WTRANS.EVENTCD="DEF")

... thinking about it, is that the problem? Can I use a parameterized
statement when an entire where clause is dynamically generated?

Bob

Reply via email to