List:General Discussion« Previous MessageNext Message »
From:Jay Paulson \(CE CEN\) Date:January 4 2006 7:30pm
Subject:RE: Calendar table workaround
View as plain text  
> I have no idea what you are asking, which may explain why no one has
replied
> to your question yet.
>
> I've been working with relational databases for 20 years and I've never
> heard the term "calendar table". What are you trying to accomplish? If you
> describe clearly what you are trying to do, perhaps someone can help you
> devise a way to do it in MySQL.
>
> Rhino
>
>
>A table of dates to which to join other tables,
>ensuring reports that reflect days for which no
>data is available.

I forget the query but I know it can be done.  But can't you just have a table (called
calendar?) with each entry having it's own row with a date column that gives whatever
date you need in it and then other columns for any other details you need to have to go
along with the date.  

After you have a table full of dates you can just do a query that will grab all the
information and display it like a calendar and show you days that have information and
days that don't have anything.

I'll see if I can't find that query for you and explain it to you.  

jay

Thread
Calendar table workaroundJonathan Mangin4 Jan
  • Re: Calendar table workaroundJonathan Mangin4 Jan
    • Re: Calendar table workaroundPeter Brawley4 Jan
      • SELECT DISTINCT uses index but is still slowJames Harvard4 Jan
        • Inconsistent rows returned & examined in slow query logJames Harvard4 Jan
  • RE: Calendar table workaroundJay Paulson \(CE CEN\)4 Jan
  • Re: Calendar table workaroundJonathan Mangin4 Jan
  • Re: SELECT DISTINCT uses index but is still slowC.R.Vegelin5 Jan
    • Re: SELECT DISTINCT uses index but is still slowJames Harvard5 Jan