...

View Full Version : ORDER BY Problem



Speedy
03-19-2006, 02:48 AM
Hi,

I have some trouble with my ORDER BY part of my SQL string



ORDER BY tbl_res.Date, tbl_res.varv DESC")


in this case the DESC doesn't have any effect at all, why??
If I do delete , tbl_res.varv it will work just fine, what's the difference??

Is there any workaround for this? I want the last added table to be on top
but right now it's first added table at top like this:

2004
2005

and Iwant it to be

2005
2004

/Speedy

Roelf
03-19-2006, 09:27 AM
which field holds the year part, shouldnt it be:
ORDER BY tbl_res.Date DESC, tbl_res.varv DESC ?

Speedy
03-19-2006, 09:43 AM
Roelf,

Thanks for your answer it worked great.

What I didn't know was that you could set ASC/DESC for each field and therefor I just had DESC in the end.

You learn something new each day of your life ;)

/Speedy



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum