![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have text file which will be inputted to the SQL table. How can I check if the row is already existing in the SQL table (the first column is the key) so I do not need to add the record (from the text file) to the table since there is an existing value. What is the best way to do a lookup before inserting a record (read from a text file). Thanks. |
#3
| |||
| |||
|
|
-----Original Message----- Personally I would BULK INSERT the text file into a staging area and then use TSQL to compare the records -- ---------------------------- Allan Mitchell (Microsoft SQL Server MVP) MCSE,MCDBA www.SQLDTS.com I support PASS - the definitive, global community for SQL Server professionals - http://www.sqlpass.org "Elgar Esteban" <elgaresteban (AT) hotmail (DOT) com> wrote in message news:02d401c34aab$9baa7b10$a001280a (AT) phx (DOT) gbl... I have text file which will be inputted to the SQL table. How can I check if the row is already existing in the SQL table (the first column is the key) so I do not need to add the record (from the text file) to the table since there is an existing value. What is the best way to do a lookup before inserting a record (read from a text file). Thanks. . |
![]() |
| Thread Tools | |
| Display Modes | |
| |