Doubt in stored procedure in asp.net
- by Surya sasidhar
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