Skip to main content
added 2 characters in body
Source Link
Himanshu
  • 32.8k
  • 32
  • 117
  • 137

I'm trying to get this output.

  • MDT 1
  • MDT 2
  • MDT 3
  • MDT 11
  • MDT 44
MDT 1 MDT 2 MDT 3 MDT 11 MDT 44 

but, The values are ordered alphabetically, so 123 comes before 2.

example :

  • MDT 1
  • MDT 11
  • MDT 156
  • MDT 2
  • MDT 3
  • MDT 303
  • MDT 44
MDT 1 MDT 11 MDT 156 MDT 2 MDT 3 MDT 303 MDT 44 

and so on.

imI'm use this code, but it seem didn't work.

SELECT * FROM file ORDER BY ABS(ID) ASC 

howHow can iI solve this? thank you.

I'm trying to get this output.

  • MDT 1
  • MDT 2
  • MDT 3
  • MDT 11
  • MDT 44

but, The values are ordered alphabetically, so 123 comes before 2.

example :

  • MDT 1
  • MDT 11
  • MDT 156
  • MDT 2
  • MDT 3
  • MDT 303
  • MDT 44

and so on.

im use this code, but it seem didn't work.

SELECT * FROM file ORDER BY ABS(ID) ASC 

how can i solve this? thank you.

I'm trying to get this output.

MDT 1 MDT 2 MDT 3 MDT 11 MDT 44 

but, The values are ordered alphabetically, so 123 comes before 2.

example :

MDT 1 MDT 11 MDT 156 MDT 2 MDT 3 MDT 303 MDT 44 

and so on.

I'm use this code, but it seem didn't work.

SELECT * FROM file ORDER BY ABS(ID) ASC 

How can I solve this?

added 4 characters in body
Source Link
Vikdor
  • 24.2k
  • 10
  • 66
  • 86

I'm trying to get this output.

  • MDT 1
  • MDT 2
  • MDT 3
  • MDT 11
  • MDT 44

but, The values are ordered alphabetically, so 123 comes before 2.

example :

  • MDT 1
  • MDT 11
  • MDT 156
  • MDT 2
  • MDT 3
  • MDT 303
  • MDT 44

and so on.

im use this code, but it seem didn't work.

SELECT * FROM file ORDER BY ABS(ID) ASC

SELECT * FROM file ORDER BY ABS(ID) ASC 

how can i solve this? thank you.

I'm trying to get this output.

  • MDT 1
  • MDT 2
  • MDT 3
  • MDT 11
  • MDT 44

but, The values are ordered alphabetically, so 123 comes before 2.

example :

  • MDT 1
  • MDT 11
  • MDT 156
  • MDT 2
  • MDT 3
  • MDT 303
  • MDT 44

and so on.

im use this code, but it seem didn't work.

SELECT * FROM file ORDER BY ABS(ID) ASC

how can i solve this? thank you.

I'm trying to get this output.

  • MDT 1
  • MDT 2
  • MDT 3
  • MDT 11
  • MDT 44

but, The values are ordered alphabetically, so 123 comes before 2.

example :

  • MDT 1
  • MDT 11
  • MDT 156
  • MDT 2
  • MDT 3
  • MDT 303
  • MDT 44

and so on.

im use this code, but it seem didn't work.

SELECT * FROM file ORDER BY ABS(ID) ASC 

how can i solve this? thank you.

Source Link
melati
  • 167
  • 2
  • 5
  • 8

Order by numeric values in SQL ascending

I'm trying to get this output.

  • MDT 1
  • MDT 2
  • MDT 3
  • MDT 11
  • MDT 44

but, The values are ordered alphabetically, so 123 comes before 2.

example :

  • MDT 1
  • MDT 11
  • MDT 156
  • MDT 2
  • MDT 3
  • MDT 303
  • MDT 44

and so on.

im use this code, but it seem didn't work.

SELECT * FROM file ORDER BY ABS(ID) ASC

how can i solve this? thank you.