• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Order by clause is not working in mysql 5 however same working in mysql 4

 
lokesh pattajoshi
Ranch Hand
Posts: 130
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everbody i was using following code for sorting in mysql 4 it was working fine but it is not working in mysql 5 can any body please help me.

SELECT data "data value" FROM TABLE_NAME order BY "data value"


Regards,
Lokesh Kumar Pattajoshi
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is "data value"? Is is a literal, or the contents of a field?
 
lokesh pattajoshi
Ranch Hand
Posts: 130
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi thanks for your replay data value is alias name.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47232
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you sure you haven't missed out an AS?
 
lokesh pattajoshi
Ranch Hand
Posts: 130
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Campbell what is AS? now i got the problem if i am using alias name with white space(example "First Name")then it is not working but how to resolve it i don't know can you please help??
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic