--:SetVar Function "AUX:LogicalSign.Str"
if exists( select * from [sysobjects] (nolock) where [type] in ('FN','TF') and [name]=N'AUX:LogicalSign.Str' )
   drop function [AUX:LogicalSign.Str]
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.Str]( @String nvarchar(max) )
returns bit
BEGIN
/*==================================================================================================
# SQLAUX scripting library | Author: Sergei Y.Kitáev
----------------------------------------------------------------------------------------------------
#
# LOGICAL FLAG (1/0) OF “BIT” TYPE — FOR STRING VALUE (ONE FOR NON-EMPTY STRING):
#
# === Usage: ===
# dbo.[AUX:LogicalSign.Str]( <String> )
#
==================================================================================================*/

return IIF( @String<>'', 1, 0 )

/*================================================================================================*/
END
GO
/*
:SetVar _Text_ "qwerty"
select dbo.[AUX:LogicalSign.Str]( 'N$(_Text_)' ) 'Logical flag for “$(_Text_)”'
select dbo.[AUX:LogicalSign.Str]( '' ) 'Logical flag for empty string'
select dbo.[AUX:LogicalSign.Str]( null ) 'Logical flag for null'
*/
