Solved

display data alphabetically

Posted on 2010-08-25
3
239 Views
Last Modified: 2013-12-13
hi
as an example of what i am looking for, consider this data in db?

id                 ref                        custref
1000           1                            cen1000
1001           2                            n248
1002           3                            cen1001
1003           4                            cen1002
1004           5                            n249

i think you get the idea. in the db the data is an unsorted order. my question is, what would be the way to display in page so that the custref data is listed by alpha? ie, all thbe cen #s first then the d's then the e's etc. because at the moment the page isdisplaying kindof unsorted even if i use orederby asc or desc. many thanks
0
Comment
Question by:peter_coop
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 5

Accepted Solution

by:
bernardbrink earned 125 total points
ID: 33519621
select id,ref,custref from table order by custref ASC
0
 
LVL 1

Assisted Solution

by:bonjourjolie
bonjourjolie earned 125 total points
ID: 33519729
Select * from table order by custref ASC.
if custref's data is non english it might have a problem with exact order, but i'll order by ascii code
0
 

Author Closing Comment

by:peter_coop
ID: 33520337
thsnk you
0

Featured Post

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question