By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,847 Members | 2,296 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,847 IT Pros & Developers. It's quick & easy.

Retrieving column name for the Error Code.

P: 75
Hi All,
I am getting an SQL Error Inserted Value to LARGE FOR COLUMN .I know the cause for this error

Is there any specific error handling method where in i can find for which column the error occurs using an sql query,procedure or functions

Ex:I have a table named emp which contains 150 columns.When i use insert query to insert values.I get an error message INSERTED VALUE TO LARGE FOR COLUMNS.

I found out manually which column the error occurs but is there any other way to retrieve the column name using sql query.

Pls help me in this regard???

Thanks in Advance!!!!!
Nov 26 '07 #1
Share this Question
Share on Google+
1 Reply


amitpatel66
Expert 100+
P: 2,367
Hi All,
I am getting an SQL Error Inserted Value to LARGE FOR COLUMN .I know the cause for this error

Is there any specific error handling method where in i can find for which column the error occurs using an sql query,procedure or functions

Ex:I have a table named emp which contains 150 columns.When i use insert query to insert values.I get an error message INSERTED VALUE TO LARGE FOR COLUMNS.

I found out manually which column the error occurs but is there any other way to retrieve the column name using sql query.

Pls help me in this regard???

Thanks in Advance!!!!!
Create a Procedure and execute this insert statement within the procedure.
Implement an EXCEPTION block and when any exception occurs you can print the data that is causing the problem.

But finding a column name would not be possible. Only the data can be found this way that is causing the problem!!
Nov 26 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.