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 |
|
bobshishka
Yak Posting Veteran
72 Posts |
Posted - 2007-12-11 : 13:56:22
|
| Im running a DTS package that converts data in a fixed width text file to SQL table. The package runs successfully, but when I go to dump 60,000+ records in the table I get this error:"Error Converting data type varchar to numeric."Is there a way that I can isolate where the offending values are located so I can manually correct them? |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-12-11 : 14:03:39
|
Do you get some information about which row generating the error?If so, edit the file at the given row. E 12°55'05.25"N 56°04'39.16" |
 |
|
|
bobshishka
Yak Posting Veteran
72 Posts |
Posted - 2007-12-11 : 14:06:30
|
| No, I would love to know which row generated the error. How could I view that? |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-12-11 : 14:19:28
|
| I'm pretty sure that DTS allows you to specify a begin row and end row for the import. I know that bcp and BULK INSERT have this. In these utility, it's called first and last. If DTS does have this, then you can figure out which row is having the issue by providing values to these options and doing lots of tests.Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2007-12-11 : 16:01:16
|
| Another option might be to create a Test table with all VARCHAR columns and then DTS the file into that table. Then you could run queries on the table to figure out what data is causing the issues. Another option, if you have SSIS, is to redirect errant rows to a file. |
 |
|
|
|
|
|