Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
supersql
Yak Posting Veteran
99 Posts |
Posted - 2006-06-15 : 14:35:37
|
| HiI am loading a text file into different sql server tables, doing this through a store proc where in it reads the complete text file and put the data into tables.Now..I want to validate each and every row of that data before loading into my tables, if the data does not meet the validation rule I shud not load the data and send an error mesg to the user saying that the text file contains wrong data at so and so place, so that the user has to correct that data in the text file and resend the text file.How can I accomplish this through a single SP. |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-06-15 : 14:44:41
|
| insert textfile into temporary table. run check against temporary table. then insert data into the other tables you need to.or use DTS or SSIS.Peter LarssonHelsingborg, Sweden |
 |
|
|
supersql
Yak Posting Veteran
99 Posts |
Posted - 2006-06-15 : 14:57:44
|
| am able to do the same as you said using temp table. The only thing is how do i need to check for errors and notify the users regarding that so that then can do corrections and send a new text file. |
 |
|
|
|
|
|