Unix Technical Forum

Re: dbload insert, update, delete

This is a discussion on Re: dbload insert, update, delete within the Informix forums, part of the Database Server Software category; --> christrier wrote: > Hi! > > My problem is: I have a database and I am extracting some data ...


Go Back   Unix Technical Forum > Database Server Software > Informix

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-20-2008, 09:31 AM
Marco Greco
 
Posts: n/a
Default Re: dbload insert, update, delete


christrier wrote:
> Hi!
>
> My problem is: I have a database and I am extracting some data from it
> and after extracting I am writing the "differences" between two files
> in other files, where one files contains all new rows, one file
> contains all deleted rows and one file contains all updated rows.
> Now I have to insert these three files into another DB.
> I can insert the "new"-File into the database with dbload but at the
> moment I have no clue about how to "insert" the updates and the
> deletes.
>
> If someone gave me a hint, that would be great
>
> Greetings
> Chris
>
>

you mean something like

database whatever;
foreach input from "deleted_file.unl" pattern delimited into var1, var2, ...;
delete from some_table where primary_key = ? using var1;
end foreach

?

If this is the case, look no further than SQSL at

http://www.4glworks.com/sqsl.htm

(Hint: if after performance,the delete statement can be prepared beforehand)

--
Ciao,
Marco
__________________________________________________ ____________________________
Marco Greco /UK /IBM Standard disclaimers apply!

Informix faq http://www.iiug.org/techinfo/faq/informix.htm
4glworks http://www.4glworks.com
Informix on Linux http://www.4glworks.com/ifmxlinux.htm

sending to informix-list
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:16 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com