Re: Building SQL Query to fill a treeview control with Year->Month->Day nodes

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: MJB (mb2_at_email.com)
Date: 07/23/04


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
> >
> >
>
>



Relevant Pages

  • Re: Table and PHP scripts for existing data
    ... >2) once the table is created inside my database on MySQL, ... >load the data in? ... DELETE query"); ... ("Invalid DATA LOAD query"); ...
    (comp.lang.php)
  • Re: Question on Variable Assignment
    ... If not in the memcache, I load the object from the db, and store a copy in the memcache. ... If you have an object which requires 10 database requests to fill, you have a major design problem - either in your database or your code. ... db query #1 ...
    (comp.lang.php)
  • RE: Populating database image field into Treeview control
    ... How many images in your underlying database which you want to load into ... Do all images will be inserted into TreeView if you comment this line? ...
    (microsoft.public.vsnet.general)
  • RE: tree view list performance issue
    ... but treeviews tend to take longer to load ... not query based. ... not very good at displaying heirarchical data, and the treeview is. ... I would like to know is it normal slower like this? ...
    (microsoft.public.access.formscoding)
  • Re: Building SQL Query to fill a treeview control with Year->Month->Day nodes
    ... > You could simply write a query that does a join with a calendar table. ... >> I have load dates for each row in my database table. ... >> I'm trying to load a treeview control with the results like so. ...
    (microsoft.public.dotnet.framework.windowsforms.controls)