i have a text file with about 60,000 lines. i need to transfer the records in the text file into 2 tables depending on whether the value of the field "product" is amoung the products of a master table with about 15 records only.the way i'm doing it now is as follows thru vb6
1)i upload all lines of text file into table1
2)in this table1, i check the field 'product' against master table and insert all records with 'product' in master table into the 2nd table table2
3)then,i do the same check again on table1 and delete all records from table1 if the 'product' is in the master table.
this is how i've transferred the contents of text file into 2 tables. but, this takes veryyyyyyyyyy long time to process. roughly 50 minutes.
can anyone tell me a better way to do this?
i'm pasting the sql i use for transferring contents to 2nd table and also for deleting the transferred things from 1st table.
'for insertion
insert into table2 select * from table1 where product in (select glstm_product from fcc_glschemetypemap)
'for deletion
delete from table1 where product in (select glstm_product from fcc_glschemetypemap)
1)i upload all lines of text file into table1
2)in this table1, i check the field 'product' against master table and insert all records with 'product' in master table into the 2nd table table2
3)then,i do the same check again on table1 and delete all records from table1 if the 'product' is in the master table.
this is how i've transferred the contents of text file into 2 tables. but, this takes veryyyyyyyyyy long time to process. roughly 50 minutes.
can anyone tell me a better way to do this?
i'm pasting the sql i use for transferring contents to 2nd table and also for deleting the transferred things from 1st table.
'for insertion
insert into table2 select * from table1 where product in (select glstm_product from fcc_glschemetypemap)
'for deletion
delete from table1 where product in (select glstm_product from fcc_glschemetypemap)