--:SetVar Function "AUX:IsSignificantGUID"
if exists( select * from [sysobjects] (nolock) where [type] in ('FN','TF') and [name]=N'AUX:IsSignificantGUID' )
   drop function [AUX:IsSignificantGUID]
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:IsSignificantGUID]( @Identifier uniqueidentifier )
returns bit
BEGIN
/*==================================================================================================
# SQLAUX scripting library | Author: Sergei Y.Kitáev
----------------------------------------------------------------------------------------------------
#
# CHECKING IF GUID IS SIGNIFICANT (NOT EMPTY):
#
# === Usage: ===
# dbo.[AUX:IsSignificantGUID]( <Itendifier> )
#
==================================================================================================*/
return IIF( @Identifier <> '00000000-0000-0000-0000-000000000000', 1, 0 )
/*================================================================================================*/
END
GO
/*
select dbo.[AUX:IsSignificantGUID]( '5C2B43BB-5E3C-4E09-AC22-0CAFD0C6B830' ) 'Is GUID significant'
select dbo.[AUX:IsSignificantGUID]( NEWID() ) 'Is GUID significant'
select dbo.[AUX:IsSignificantGUID]( '00000000-0000-0000-0000-000000000000' ) 'Is GUID significant'
select dbo.[AUX:IsSignificantGUID]( null ) 'Is GUID significant'
*/
