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 |
chintanpshah
Starting Member
5 Posts |
Posted - 2010-03-19 : 09:02:36
|
Hi,I am writing queries with CONVERT function. I have more than 200 columns in query. I am processing each row and write it to file. I need to log all errors occured during process. I need to capture column which is causing exception (Arithmetic overflow error converting numeric to data type varchar.) and log it in other file and send to administrator.How can I get Column which is causing exception?Thanks in advance...Chintan ShahSoftware Engineer |
|
chintanpshah
Starting Member
5 Posts |
Posted - 2010-03-20 : 02:04:14
|
Anyone?Chintan ShahSoftware Engineer |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-03-20 : 03:27:38
|
the best way to do this is to check the lengths of source fields against your convertion statement and check if you've specified correct lengths to hold values coming. Also I assume you're not doing any aggregations inside in which your convertion staetement should have a precision greater than that of source length------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
chintanpshah
Starting Member
5 Posts |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|