Solved

ibatis insert or update?

Posted on 2010-09-10
1
1,126 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
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:

763 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now