I have a trigger to update and fix wrong data like this:
create trigger FixDataMC1 on MC1LINE2
after update, insert, delete
update MC1LINE2 set [Date] = REPLACE([Date], '"', ''), [Time] = REPLACE([Time], '"', ''), [VACUUM_PRESS.] = REPLACE([VACUUM_PRESS.], ',', '')
update MC1LINE2 set [Date] = '20' + [Date] where LEN([Date]) <=8
delete from MC1LINE2 where [No.] like '%No.%'
And here is bulk insert from csv files:
BULK INSERT vw_bulk_insert_test
FROM '\\172.27.10.11\MC1-LINE #2\MC01-2013-0120-0448.csv'
ROWTERMINATOR = '\n',
My problem is: csv file contains a lot of data. Daily, I have to import a lot of data from csv file into SQL, the trigger needs to update wrong data for me, but I just want the trigger fix data for just imported data (new records only), not for already updated data, currently, I have to wait long time to run the trigger for all my existing records.
How can I do that?