Login     Register

        Contact Us     Search

XLeratorDB/strings Online Documentation

SQL Server EXACT Function


EXACT

Updated: 30 April 2009

Use EXACT to compare two text strings. EXACT returns TRUE if they are exactly the same, FALSE otherwise.
Syntax
SELECT [wctString].[wct].[EXACT] (
   <@Text1, nvarchar(max),>
 ,<@Text2, nvarchar(max),>
 ,<@CaseSensitive, bit,>)
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 secdon 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 Types
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
-----
1
 
(1 row(s) affected)



select
wct.exact(
'National Aeronautics and Space Administration'
,'national aeronautics and space administration'
,1
)
This produces the following result
-----
0
 

(1 row(s) affected)



Copyright 2008-2013 WestClinTech LLC         Privacy Policy        Terms of Service