Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Order by Date?

Author  Topic 

beady
Starting Member

28 Posts

Posted - 2006-07-24 : 06:58:00
Is it possible to order by date to have the most recent date come up first in the results?

Part of the code is:
....
citation_date BETWEEN @citation_date1 AND @citation_date2

Thanks.

RyanRandall
Master Smack Fu Yak Hacker

1074 Posts

Posted - 2006-07-24 : 07:03:54
[code]order by citation_date desc[/code]?


Ryan Randall
www.monsoonmalabar.com London-based IT consultancy

Solutions are easy. Understanding the problem, now, that's the hard part.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-07-24 : 07:03:57
add this to the end of your query

order by citation_date desc



KH

Go to Top of Page

RyanRandall
Master Smack Fu Yak Hacker

1074 Posts

Posted - 2006-07-24 : 07:05:18
Ha!



Ryan Randall
www.monsoonmalabar.com London-based IT consultancy

Solutions are easy. Understanding the problem, now, that's the hard part.
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-07-24 : 07:09:50
Ha ! 3 seconds slower


KH

Go to Top of Page

beady
Starting Member

28 Posts

Posted - 2006-07-24 : 08:33:38
Beauty, folks :) Thanks.
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2006-07-24 : 11:31:53
beady, Learn SQL
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2006-07-24 : 12:31:44
quote:
Originally posted by beady

Is it possible to order by date to have the most recent date come up first in the results?

Part of the code is:
....
citation_date BETWEEN @citation_date1 AND @citation_date2

Thanks.




You're joking, right?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2006-07-24 : 12:38:35
"You're joking, right?"
It's a test to see how fast SQL Team responses.


KH

Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-07-24 : 12:58:51
"It's a test to see how fast SQL Team responses"

6 minutes - and 6 minutes and 3 seconds.

Poor show chaps ...

... http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=68643&SearchTerms=Exactly+3+minutes

Kristen

Go to Top of Page
   

- Advertisement -