how to order by - alphanumeric

  • how to order by - alphanumeric

    Example:

    Input:

    L1

    L2

    L3

    L5

    L7

    L6

    L8

    L4

    Output:

    L1

    L2

    L3

    L4

    L5

    L6

    L7

    L8

  • SQL orders alpha-numeric just fine normally.

    [font="Courier New"]SELECT 'L1'

    UNION ALL SELECT 'L2'

    UNION ALL SELECT 'L3'

    UNION ALL SELECT 'L5'

    UNION ALL SELECT 'L7'

    UNION ALL SELECT 'L6'

    UNION ALL SELECT 'L8'

    UNION ALL SELECT 'L4'

    ORDER BY 1[/font]

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply