--:SetVar Function "AUX:LogicalSign.DMP"
if exists( select * from [sysobjects] (nolock) where [type] in ('FN','TF') and [name]=N'AUX:LogicalSign.DMP' )
   drop function [AUX:LogicalSign.DMP]
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:LogicalSign.DMP]( @Number decimal(28,10) )
returns bit
BEGIN
/*==================================================================================================
# SQLAUX scripting library | Author: Sergei Y.Kitáev
----------------------------------------------------------------------------------------------------
#
# LOGICAL FLAG (1/0) OF “BIT” TYPE — ONE FOR SIGNIFICANT NOT NULL (“$(dt_MPDecimal_AUX)”):
#
# === Usage: ===
# dbo.[AUX:LogicalSign.DMP]( <Number> )
#
==================================================================================================*/

return IIF( @Number<>0, 1, 0 )

/*================================================================================================*/
END
GO
/*
:SetVar Number "74.5134"
select dbo.[AUX:LogicalSign.DMP]( $(Number) ) 'Logical flag for $(Number)'
select dbo.[AUX:LogicalSign.DMP]( 0 ) 'Logical flag for 0'
select dbo.[AUX:LogicalSign.DMP]( null ) 'Logical flag for null'
*/
