How to convert a string to a numeric

  • Hi all,

    Can someone help me with the syntax of converting a string to a numeric.

    Thanks a lot in advance

  • Have a look at CAST and CONVERT eg

    declare @variable varchar(10)

    set @variable = '123'

    select cast(@variable as int)

    Jeremy

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

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