--:SetVar Function "AUX:NegativeOrZero.BigInt"
if exists( select * from [sysobjects] (nolock) where [type] in ('FN','TF') and [name]=N'AUX:NegativeOrZero.BigInt' )
   drop function [AUX:NegativeOrZero.BigInt]
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:NegativeOrZero.BigInt]( @Value bigint )
returns bigint
BEGIN
/*==================================================================================================
# SQLAUX scripting library | Author: Sergei Y.Kitáev
----------------------------------------------------------------------------------------------------
#
# UPPER LIMITATION WITH ZERO (“BIGINT” TYPE):
#
# === Usage: ===
# dbo.[AUX:NegativeOrZero.BigInt]( <Value> )
#
==================================================================================================*/

return dbo.[AUX:Minimum.BigInt]( @Value, 0 )

/*================================================================================================*/
END
GO
/*
select dbo.[AUX:NegativeOrZero.BigInt]( 8453 ) 'Negative or zero'
select dbo.[AUX:NegativeOrZero.BigInt]( -27 ) 'Negative or zero'
*/
