Use a properties file to specify the statements, and then include them from within the selectKey statement. There was a post about this a while back, but I can't find it. You could look in the documentation to see if there's any information about including properties.
Niels ________________________________ From: Perl fromSpain [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 12, 2008 10:30 AM To: user-java@ibatis.apache.org Subject: sealectKey database abstraction Hi, I'm using the "selectKey" with insert commands. It works great. We are using a development database based in SQLite, and the select is like this: select max(id)+1 from TABLE Now, we are moving our project to the production enviroment, a Oracle 10g database, and in this scenario we'll use a sequence: Select theSequence.nextval from dual The problem: in each scenario, the selectKey statement must be different. How can I avoid this, or minimize? Thanks in advance