Solved

ibatis insert or update?

Posted on 2010-09-10
1
1,131 Views
Last Modified: 2012-05-10
I've been looking for an example how this should be handled but found nothing.
I have some records I want to Insert into a table, but if the PKs for these records already exist, I want iBatis to do an update instead.
How is this usually done with iBatis?
0
Comment
Question by:blackfrancis75
1 Comment
 
LVL 5

Accepted Solution

by:
blackfrancis75 earned 0 total points
ID: 33662619
pull your data into a temp table, then: insert into realtable select * from temp_table where id not in (select id from realtable);
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Java Restore security prompts not working 10 57
ejb mdb examples 1 8
Java program running SQL query 5 37
SQLite with Mobile Development 4 22
This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question