Re: Retrieve new values of a database
Posted in 2006
You could build a table in the Informix database that has a list of all of the id's that are already in MSSQL. Then just join on that table to get a list of id's that you need to migrate to MSSQL, once you have moved them into MSSQL insert those id's into your table so that the next run will elliminate those records. You have said that you have no control over the Informix database to you may need to use a temporary table that gets loaded from MSSQL at the begining of each run. I have not tried to use Informix temp tables with C# so I'm not sure that the ability to do that even exists. If that won't work then pull all of the ids from MSSQL and Informix into datasets and use that to get the ids that you need to migrate from Informix to MSSQL. You'll miss a few on each run I'm sure, but nothing is perfect and you can always pick them up on the next run. Come to think of it I like this idea better than the temp table idea. ----- Original Message ---- From: luissol <luissol@gmail.com> To: informix-list@iiug.org Sent: Tuesday, October 3, 2006 11:10:09 AM Subject: Re: Retrieve new values of a database No, because I have no control over the Informix database, they have an ID for each registry, the problem is that not all the times it is sequential, for example they have 1 2 4 5 6 3 (not in order) 7 8 10 9 (not in order) what I have considered is using a counter in a table of my database, then use a count of all the registers of the informix table and get a top (of the difference between these two tables), the problem is that if in the lapse between the count and the selection of the registers they insert something in the table of informix, I will be missing some values, any ideas to solve this or use another solution... Thanks Luis Saavedra John Carlson wrote: > On 2 Oct 2006 15:58:23 -0700, "luissol" <luissol@gmail.com> wrote: > > >Hello, I have the view from a table that keeps incrementing with new > >values, I have no control of this database, but I need to retrieve the > >new values to insert it on my table (sql server) and send some > >parameters of the database to another application, I'm using C# to get > >access to both databases, so does anybody know of an efficient way to > >retrieve only the new values of the dtabase? > > > > Is it possible to put an insert trigger on this table? > > JWC _______________________________________________ Informix-list mailing list Informix-list@iiug.org http://www.iiug.org/mailman/listinfo/informix-list