--:SetVar Function "AUX:ToString.DecMoney"
if exists( select * from [sysobjects] (nolock) where [type] in ('FN','TF') and [name]=N'AUX:ToString.DecMoney' )
   drop function [AUX:ToString.DecMoney]
GO
/* Translated by $SQLTRANS utility (SQL-file technology). Method author: Sergei Y.Kitáev.
** Script translation date-time: 2022-11-27 00:29:27.24 (stamp of SQL-file generation). */
create function [AUX:ToString.DecMoney]( @Number decimal(19,4) )
returns varchar(21)
BEGIN
/*==================================================================================================
# SQLAUX scripting library | Author: Sergei Y.Kitáev
----------------------------------------------------------------------------------------------------
#
# NUMBER CONVERSION TO STRING (“$(dt_DecMoney_AUX)” TYPE):
#
# === Usage: ===
# dbo.[AUX:ToString.DecMoney]( <Number> )
#
==================================================================================================*/

if @Number is null return null

return CONVERT( varchar(21), @Number )

/*================================================================================================*/
END
GO
/*
select dbo.[AUX:ToString.DecMoney]( 345178.21354 ) 'Money as string'
select dbo.[AUX:ToString.DecMoney]( -8435 ) 'Money as string'
*/
