SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Order by Date?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

beady
Starting Member

28 Posts

Posted - 07/24/2006 :  06:58:00  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

United Kingdom
1074 Posts

Posted - 07/24/2006 :  07:03:54  Show Profile  Reply with Quote
order by citation_date desc
?


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)

Singapore
17598 Posts

Posted - 07/24/2006 :  07:03:57  Show Profile  Reply with Quote
add this to the end of your query

order by citation_date desc



KH

Go to Top of Page

RyanRandall
Flowing Fount of Yak Knowledge

United Kingdom
1074 Posts

Posted - 07/24/2006 :  07:05:18  Show Profile  Reply with Quote
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)

Singapore
17598 Posts

Posted - 07/24/2006 :  07:09:50  Show Profile  Reply with Quote
Ha ! 3 seconds slower


KH

Go to Top of Page

beady
Starting Member

28 Posts

Posted - 07/24/2006 :  08:33:38  Show Profile  Reply with Quote
Beauty, folks :) Thanks.
Go to Top of Page

madhivanan
Premature Yak Congratulator

India
22754 Posts

Posted - 07/24/2006 :  11:31:53  Show Profile  Send madhivanan a Yahoo! Message  Reply with Quote
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 - 07/24/2006 :  12:31:44  Show Profile  Reply with Quote
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)

Singapore
17598 Posts

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


KH

Go to Top of Page

Kristen
Test

United Kingdom
22403 Posts

Posted - 07/24/2006 :  12:58:51  Show Profile  Reply with Quote
"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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000