Please check my below code that gives the expected valueDECLARE @Value DECIMAL(18,2)SET @Value = 12.4;WITH Derived(Feet, Inches, RemFeet)AS( SELECT CAST(CAST(@Value AS INT)/12 AS VARCHAR(18)) , REPLACE(CAST(@Value - CAST(@Value AS INT) AS FLOAT), '0.', '') , CAST(@Value AS INT) % 12)SELECT CASE WHEN RemFeet > 0 THEN Feet + ' ' + CAST(RemFeet AS VARCHAR(18)) + Inches ELSE Feet + ' ' + Inches END AS [Feet And Inches]FROM Derived;
Regards,Alwyn.M