Getting the Decimal Part of a Float or Decimal Number using Floor function in Sql Server

Vishalneeraj-24503
Posted by Vishalneeraj-24503 under Sql Server category on | Points: 40 | Views : 278
DECLARE @Input DECIMAL(10,4);
SET @Input = 12345.6789

SELECT @Input - FLOOR(@Input) AS [DecimalPart]
GO


Output:-
0.6789

Comments or Responses

Login to post response