Conversion failed because the data value overflowed the data type used by the provider.

  • dtcalif

    Grasshopper

    Points: 13

    I had never seen this error before and have been working with SQL Server for 19 years. Today I created a view on a table and subsequently changed the data type on one field of that underlying table from int to varchar(50). That caused this error to occur when I attempted to query the view across a linked server.  I could see from the definition of the view that it still maintained the "int" datatype for the table column I had altered.
    Solution was to drop the view and recreate it.

  • Sue_H

    SSC Guru

    Points: 90009

    dtcalif - Wednesday, August 1, 2018 9:22 AM

    I had never seen this error before and have been working with SQL Server for 19 years. Today I created a view on a table and subsequently changed the data type on one field of that underlying table from int to varchar(50). That caused this error to occur when I attempted to query the view across a linked server.  I could see from the definition of the view that it still maintained the "int" datatype for the table column I had altered.
    Solution was to drop the view and recreate it.

    sp_refreshview should update the metadata for the view definition.

    Sue

Viewing 2 posts - 16 through 17 (of 17 total)

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