EXACT
Updated 2023-11-10 19:29:03.160000
Syntax
SELECT [westclintech].[wct].[EXACT] (
<@Text1, nvarchar(max),>
,<@Text2, nvarchar(max),>
,<@CaseSensitive, bit,>)
Description
Use the scalar function EXACT to compare two text strings. EXACT returns TRUE if they are exactly the same, FALSE otherwise.
Arguments
@Text1
is the first text to be evaluated. The @Text1 argument can be of data types that are implicitly convertible to nvarchar or ntext.
@Text2
is the second text to be evaluated. The @Text2 argument can be of data types that are implicitly convertible to nvarchar or ntext.
@CaseSensitive
declares the search as being either case sensitive or case insensitive, regardless of collation. The @CaseSenstive argument must be of data types that are implicitly convertible to bit.
Return Type
bit
Remarks
EXACT does not support the use of wildcards.
EXACT supports case sensitive searches. @CaseSensitive = 1, makes the search case sensitive.
Examples
select wct.exact(
'National Aeronautics and Space Administration'
,'national aeronautics and space administration'
,0
);
This produces the following result.
{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"1"}]}
select wct.exact(
'National Aeronautics and Space Administration'
,'national aeronautics and space administration'
,1
);
This produces the following result.
{"columns":[{"field":"column 1","headerClass":"ag-right-aligned-header","cellClass":"ag-right-aligned-cell"}],"rows":[{"column 1":"0"}]}