Is it possible to get a variable type of a numeric to this:
Float converts to 123321, but I need 123321.00
Since cast(@v as decimal(18,@p)) is not possible (where @p is type of tinyint, for ex. 2), I did it like this:
CAST(ROUND(CAST(REPLACE(FORMAT(123321.00001, 'N2'), ',', '') as decimal(18,8)), 2) as float(2))
But this outputs the same: 123321.