vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 |
| |||
| From the keyboard of "christrier" <chrishunnell@gmail.com>: > 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. Apparently you have some scripts that create the "diffenece" files. Why don't you let the scripts create the necessary UPDATE or DELETE statements and run them with dbaccess? Of course this affords to rewrite the scripts. HTH Christian -- #include <std_disclaimer.h> /* The opinions stated above are my own and not necessarily those of my employer. */ |
| |||
| [quoting added and repaired] From the keyboard of "christrier" <chrishunnell@gmail.com>: >>> 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. >> >> Apparently you have some scripts that create the "diffenece" >> files. Why don't you let the scripts create the necessary >> UPDATE or DELETE statements and run them with dbaccess? Of >> course this affords to rewrite the scripts. > this would be a possibility! the problem is that i don't know > how large this "difference"-files will be and I have no idea how > fast dbaccess deletes, say 100.000 lines. In that case you should also include COMMITs every few 1000 lines to avoid long transaction aborted issues. And it's not dbaccess that deletes the rows but the server. dbaccess justs sends the SQL statements. Christian -- #include <std_disclaimer.h> /* The opinions stated above are my own and not necessarily those of my employer. */ |
| |||
| > > In that case you should also include COMMITs every few 1000 lines > to avoid long transaction aborted issues. > > And it's not dbaccess that deletes the rows but the server. > dbaccess justs sends the SQL statements. thank you for your advice although it is clear to me that dbaccess does not delete any rows, but to explain something it is easier to say "is it fast?" instead of "blablub how fast are the sqls processed by the server". greetings chris |