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
 SQL Server Development (2000)
 get year & month ..display as nested..

Author  Topic 

meeta
Starting Member

45 Posts

Posted - 2001-10-24 : 11:58:09
I've to show events based on year then month & then events for that specific month. i can get year with distinct sql query:

strYear="Select distinct Year(eventdate) from events"

but how can I imporvise this query so that it shows

2001
oct
event1
event2
nov
event1
2001
jan
event1

do i've use joins?As year & month need to be grabbed form eventdate, I'm not quite sure how this can accomplished?

aspmessageboard asked me place heer for the answer hope someone would point me answer to this question!

Thanks in advance


   

- Advertisement -