Re: dbload insert, update, delete
Posted in 2005
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