Home Forums SQL Server 2008 SQL Server 2008 - General SQL Server Collation (ASCII Table sort and Case Insensitive/Accent Insensitive) RE: SQL Server Collation (ASCII Table sort and Case Insensitive/Accent Insensitive)

  • well i couldn't figure out what order you wanted via your example;

    lets switch to real code so we can figure it out better.

    does this do what you want? what's wrong witht he order in this example? you'll need to explain why certain things need to go first vs second...that's what is missing for me, i think; i can't get a handle on the order by criteria.

    ;With MySampleData AS (

    SELECT N,

    CHAR(MiniTally.N) + 'pple' As Word

    FROM (SELECT

    ROW_NUMBER() OVER (ORDER BY name) AS N

    FROM sys.columns)MiniTally

    WHERE N BETWEEN 32 AND 255

    )

    SELECT *

    from MySampleData

    ORDER BY Word,Word Collate SQL_Latin1_General_CP850_BIN

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!