[dba-SQLServer]strComp

Stuart McLachlan stuart at lexacorp.com.pg
Mon Aug 18 06:46:08 CDT 2003


On 18 Aug 2003 at 9:53, Martin Reid wrote:

> Anyone know of a similar function for use with SQL Server? Seems to coke on
> strComp
> 
> 

I think you need to roll your own. Something like this (air code, so 
may need a bit of tweaking)

Select 'strComp'  = 
    Case 
          When (String1 Is Null)  or (String2 Is Null) Then Null
		When String1 < String2 Then -1
           When String1 = String2 Then 0
           When String 1 > String2 Then 1
    End
 
-- 
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System 
Support.





More information about the dba-SQLServer mailing list