Doubt in stored procedure in asp.net
Posted
by Surya sasidhar
on Stack Overflow
See other posts from Stack Overflow
or by Surya sasidhar
Published on 2010-04-01T06:05:00Z
Indexed on
2010/04/01
6:13 UTC
Read the original article
Hit count: 166
sql-server
hi, i am writing a sotreprocedure displaying month and year it is working but it is not coming in a order descending order can u help me my procedure like below...
ALTER procedure [dbo].[audioblog_getarchivedates]
as
begin
select DateName(Month,a.createddate) + ' ' + DateName(Year,a.createddate) as ArchiveDate
from audio_blog a
group by DateName(Month,a.createddate) + ' ' + DateName(Year,a.createddate)
order by DateName(Month,a.createddate) + ' ' + DateName(Year,a.createddate) desc
end
result will come like this
March 2010
January 2010
February 2010
but it is not in a order (desc) can u help me
© Stack Overflow or respective owner