Error converting data type varChar to Float

  • ng_rai

    SSC Enthusiast

    Points: 189

    Hello Everyone,

    I am running a really big code. At some point, I am getting an error "Msg 8114, Level 16, state 5, Line 1 error converting data type varchar to float."

    I am not able to identify the error at all.


    Please help.

  • Mr. Brian Gale


    Points: 22549

    Can you post more information?

    What I expect you are doing is something like:

    SELECT *
    WHERE <COLUMN> = 12.3

    If that is the case, double check the datatype of <COLUMN>.  Based on that error, I am pretty sure that it is VARCHAR and you are comparing it to a FLOAT.

  • Steve Jones - SSC Editor

    SSC Guru

    Points: 717840

    You have an implicit or explicit conversion taking place. Somewhere your code is trying to cast data to float, and there are values in the varchar field that cannot be CAST() that way. You will have to look through the code for a place where you are converting or using a function/operator on a field that contains float data.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply