Syntax error converting the varchar value to a column of data type int

SQL Server Error Message: Syntax error converting the varchar value to a column of data type int

Error Message:

Server: Msg 245, Level 16, State 1, Line 1
Syntax error converting the varchar value to a column of data type int.

Causes:

There are many ways this error may be encountered but the common reason is that you are trying to convert, either implicitly or explicitly, a varchar value to an int data type and the varchar value cannot be converted to an int data type.  You may have a varchar column that may have integer values on most records but where some have non-integer values.

One other common reason why this is encountered is when creating a dynamic SQL statement and the query involves combining a varchar variable with an integer variable.

Need Additional Assistance?

Looking for a second opinion on a SQL Server error code? Get in touch with
Xynomix and we'll assess your issue and help to action a fix.

Contact Us



    On submitting this form, Xynomix will store your details and may contact you in relation to your request. For more information on how we process data, please see our privacy notice.

    Testimonials

    Careers at Xynomix
    Testimonials

    IT Manager – Public Sector

    “Xynomix provide us with remote monitoring and administration for Linux, as well as Oracle. The proactive monitoring aspect of our service has proved extremely valuable. Whenever potential issues have been recognised with the system, it has always been identified by the monitoring technology and Xynomix DBAs begin work on a preventative fix immediately.”

    Read More »
    Success Stories
    Testimonials

    IT Manager – Trade Union

    “Since 2003 Xynomix have provided support and consultancy for our Oracle and SQL Server databases. We’ve found their knowledge to be extensive and they’ve ensured that our databases run smoothly with very little downtime. The flexibility and creativity that Xynomix show when working with us enables us to meet budgets and hit our project timescales.”

    Read More »
    Application Manager - Banham Group
    Testimonials

    Application Manager – Banham Group

    “The Oracle database supports a key ERP application which holds information on our customers, invoicing and fulfilment and is therefore essential to the successful day to day running of our business. For over 6 years, Xynomix has provided us with outstanding database support and expertise. We work with a number of Xynomix senior Oracle DBA’s who know our systems inside and out.”

    Read More »