Thanks! Dan. Tim Ding
-----Original Message----- From: Daniel Henrique Ferreira e Silva [mailto:[EMAIL PROTECTED] Sent: Friday, October 28, 2005 2:28 PM To: dev@ibatis.apache.org Subject: Re: iBatis insertion issue, thanks! Hi Tim, This kind of stuff is not much encouraged by iBATIS staff but depending on your database, i guess it is possible. It's not encouraged because you can use stored procedures. iBATIS supports store procedures smoothly and then you'll can use all resources your database engine delivers to you, like savepoints and any other one that i can't remember of right now. Cheers, Daniel Silva. On 10/28/05, Tim Ding <[EMAIL PROTECTED]> wrote: > > > > HI, > > My name is Tim Ding, working as Java Developer/iBATIS Developer. I > want to use one stanza (that is, for example <insert> and </insert>) > or <statement>s (like <statement> and </statement>) to do more than > one SQL insertions. The example likes: > > <insert id="save_account_profile" parameterClass="java.util.HashMap"> > <selectKey resultClass="int" keyProperty="pk"> > ACCOUNT_PROFILE_SEQ.NEXTVAL AS pk from dual > </selectKey> > > <!-- first insertion --> > insert into PROFILE_HISTORY > (PK, > TYPE, > DATE, > ACCOUNT_ID, > ...... > ) > values > (#pk#, > #type#, > #date#, > #acountId#, > ...... > ) > > <!-- second insertion --> > insert into ACCOUNT_SUMMARY > (PK, > PRODUCTION_DATE, > CYCLE_CODE, > ...... > ) > values > (#pk#, > #billingCycleDate#, > #cycleCode#, > ..... > ) > </insert> > > It seems that I had found documents/user guide for this kind of iBatis > insertion before, but I cannot find where it is now. When I try to run > it, there is an exception about the iBatis syntax. Could you please > let me know what is the correct syntax for this type of iBatis > statement. Thank you very much! > > > Regards! > > Tim Ding > Billing Collections > Tel: 604-432-2167 > 10T1 #77 BNBYBCHQ > >