Before I go down the a long path of writing a script for 250 tables, has anyone got a better idea.
I am using MS SQL 2000 and I need to import incremental data changes from a unix system.
There are 250 tables on the unix system. When a record in the unix table is inserted/changed a line is written to an ascii or xml file.
I need to run some code on SQL server to read these files and import the data. It needs to do this every 10-15mins and it has to handle inserts and updates.
The only way I can think of doing this, is to create a script to update the table, then insert into the table. I am going to have to specify every single column in the table for both the update & insert. Then repeat this for all 250 tables.
Is dynamic SQL an option here. Could I read sysobjects & syscolumns and generate the code or is this a bad idea?
I am using MS SQL 2000 and I need to import incremental data changes from a unix system.
There are 250 tables on the unix system. When a record in the unix table is inserted/changed a line is written to an ascii or xml file.
I need to run some code on SQL server to read these files and import the data. It needs to do this every 10-15mins and it has to handle inserts and updates.
The only way I can think of doing this, is to create a script to update the table, then insert into the table. I am going to have to specify every single column in the table for both the update & insert. Then repeat this for all 250 tables.
Is dynamic SQL an option here. Could I read sysobjects & syscolumns and generate the code or is this a bad idea?