Solved

ibatis insert or update?

Posted on 2010-09-10
1
1,138 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

726 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