all groups > vj# > june 2005 >
You're in the

vj#

group:

How to sort data?


How to sort data? Christian-Josef Schrattenthaler
6/12/2005 12:00:00 AM
vj#:
Hi!

I get data from a file, and send them to a table. Is it possible to sort the
data?

Greetings,
Christian.

Re: How to sort data? Christian-Josef Schrattenthaler
6/12/2005 12:00:00 AM
Hi!

I found it.
It's verry simple.
Only add "... ORDER BY xyz" in the SQL-Statement.
The most times, I think to difficult...

Greeting,
christian.

Re: How to sort data? Lars-Inge Tønnessen [VJ# MVP]
6/13/2005 8:41:03 PM
Correct, and if you want to sort in the reverse order add "desc". Eg.:
"SELECT * FROM Table ORDER BY name DESC"

You can also sort on more than one row by adding the columns like this:
"SELECT * FROM Table ORDER BY LastName, FirstName"

This will give:
Johnson, Bernt
Johnson, Jimmy

If you only do LastName:
"SELECT * FROM Table ORDER BY LastName"
The outout _cound_ give:

Johnson, Jimmy
Johnson, Bernt


Regards,
Lars-Inge Tønnessen

Re: How to sort data? Christian-Josef Schrattenthaler
6/14/2005 9:00:53 AM
Hi Lars-Inge!

[quoted text, click to view]

Thanks! I forgot this to do in my code, because I need first the
POSTLEITZAHL and then the NAME.

Greetings,
Christian.
AddThis Social Bookmark Button