Re: Building SQL Query to fill a treeview control with Year->Month->Day nodes
From: MJB (mb2_at_email.com)
Date: 07/23/04
- Next message: Aaron [SQL Server MVP]: "Re: Building SQL Query to fill a treeview control with Year->Month->Day nodes"
- Previous message: Mike G: "for auto question"
- In reply to: Aaron [SQL Server MVP]: "Re: Building SQL Query to fill a treeview control with Year->Month->Day nodes"
- Next in thread: Aaron [SQL Server MVP]: "Re: Building SQL Query to fill a treeview control with Year->Month->Day nodes"
- Reply: Aaron [SQL Server MVP]: "Re: Building SQL Query to fill a treeview control with Year->Month->Day nodes"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 23 Jul 2004 10:46:49 -0400
Hmm, looks like it could help. Unfortunately, I only want my treeview to
show the dates that are actually in the database, where as this approach
seems to just show all dates between a range.
"Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
news:eSYmS0LcEHA.3480@TK2MSFTNGP11.phx.gbl...
> You could simply write a query that does a join with a calendar table.
> http://www.aspfaq.com/2519
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
>
>
> "MJB" <mb2@email.com> wrote in message
> news:euAyUyLcEHA.2476@TK2MSFTNGP09.phx.gbl...
> > Hello,
> >
> >
> >
> > I have load dates for each row in my database table. I'm trying to
build
> a
> > query that will give me all of the unique years, then all of the unique
> > months for that year, then finally all of the unique days for that
month.
> >
> >
> >
> > I'm trying to load a treeview control with the results like so.
> >
> >
> >
> > Year
> >
> > |_
> >
> > Month
> >
> > |_
> >
> > Day
> >
> > Day
> >
> > Etc.
> >
> > Year
> >
> > |_
> >
> > Month
> >
> > |_
> >
> > Day
> >
> > Etc.
> >
> >
> >
> > If anyone has any ideas or experience on how to do this I would
appreciate
> > it.
> >
> >
> >
> > Thanks
> >
> >
>
>
- Next message: Aaron [SQL Server MVP]: "Re: Building SQL Query to fill a treeview control with Year->Month->Day nodes"
- Previous message: Mike G: "for auto question"
- In reply to: Aaron [SQL Server MVP]: "Re: Building SQL Query to fill a treeview control with Year->Month->Day nodes"
- Next in thread: Aaron [SQL Server MVP]: "Re: Building SQL Query to fill a treeview control with Year->Month->Day nodes"
- Reply: Aaron [SQL Server MVP]: "Re: Building SQL Query to fill a treeview control with Year->Month->Day nodes"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|