ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Schall" <mike.sch...@gmail.com>
Subject Statement terminator
Date Tue, 11 Mar 2008 19:35:49 GMT
I'm attempting to perform two statements within a single insert.  We are
using DB2 and I thought ; was the separator, but I get SQLSTATE: 42601.  I
have tried several possible solutions with no luck.  Has anyone seen this or
able to offer an idea?  Is this even possible?

Thanks
Mike

    <insert id="insert" parameterClass="foo">
        INSERT INTO ${schema}.foo(
            id,
            foo,
            bar)
        VALUES (
            #id#,
            #foo#,
            #bar#);
        UPDATE ${schema}.bar
            SET bar = #bar#
        WHERE
            id = #id#
            AND foo = #foo#
    </insert>

Mime
View raw message