Home Forums SQL Server 7,2000 T-SQL Sorting issue when meet there is ASCII RE: Sorting issue when meet there is ASCII

  • Seems like this works for me so far,

    Select part_code, REPLACE(part_code,'-','#')

    from A_Test

    WHERE REPLACE(part_code,'-','#') COLLATE SQL_Latin1_General_Cp437_BIN >= REPLACE('RKS0516-W-Z','-','#') COLLATE SQL_Latin1_General_Cp437_BIN

    ORDER BY REPLACE(part_code,'-','#') collate SQL_Latin1_General_Cp437_BIN

    Thanks John

    Together, we can make wonders!