Error converting data type varchar to numeric.

  • Hi

     

    Please help me out

    declare @CID numeric(3,0)

    set @CID = 121

    SELECT *

    from Table_name

    where ID Like ''''+@CID+'%'''

    I am getting error like

    Msg 8114, Level 16, State 5, Line 3

    Error converting data type varchar to numeric.

     

    T.I.A

  • chane the datatype of @CID to varchar and that should solve your problem.

    Cheers,
    Sugeshkumar Rajendran
    SQL Server MVP
    http://sugeshkr.blogspot.com

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

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