Remove Decimals using PARSENAME

Rajnilari2015
Posted by Rajnilari2015 under Sql Server category on | Points: 40 | Views : 188
DECLARE @somevalue VARCHAR(50) = '123459078.9005'; --set the initial value

SELECT ValueBeforeDecimal =PARSENAME(@somevalue, 2)


Result

ValueBeforeDecimal
----------------------
123459078

Comments or Responses

Login to post response