sql - How can I convert string '1234-2345' to integer? -
how can convert string integer?
declare @string nvarchar(30)='1234-2345'
how can convert @string integer type?
you can remove dash , cast result integer. select cast(replace('1234-2345','-','') int)
Comments
Post a Comment