Please try the following.
The FORMAT() function is using .Net CLR formatting.
Combination of '0's and '#'s will give you what you are looking for.
SQL
DECLARE @var DECIMAL(10,6) = -0.373783;
SELECT @var AS [Before]
, CAST(@var AS VARCHAR(12)) AS [After]
, FORMAT(@var,'###0.######') AS [Formatted];
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…