Sql Order By

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ayakamacy
    New Member
    • May 2015
    • 14

    Sql Order By

    Hello there, can anyone help me out with this problem?

    How to Query this:



    My query code:

    Code:
    SELECT TOP 1000 [WireID]
      ,[PadNo]
      ,[Pattern]
      ,[Tester]
    FROM [WLSystem].[dbo].[TblR8Pure] ORDER BY LEN(Tester), Tester ASC
    GO
  • Seth Schrock
    Recognized Expert Specialist
    • Dec 2010
    • 2965

    #2
    This is why you don't store multiple values in the same field. With the data that you have provided, it would work to use the SUBSTRING() function to get the left two characters and then sort based on that. However, if you have any data where the left number is either one character or three or more characters, then this wouldn't work.

    Comment

    Working...