Connecting Tech Pros Worldwide Help | Site Map

Help: Grouping dates in query

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 13th, 2005, 04:03 AM
John
Guest
 
Posts: n/a
Default Help: Grouping dates in query

I'm building a report where each row represents one month and its 1 to
5 weeks. A report query groups the source table date into a "month and
year" expression. A subreport links to the main report using the
query's "month and year" expression.

Problem is I can't figure out how to group the source table's dates
into a "Mmmm yyyy" and then link the subreport to the relevant week of
that "Mmmm Yyyy".

source table:
tbl_Promotion
Street_Date
Promo_Name

report output:
(line 1) November 2004, [week1] promos, [week2] promos...
(line 2) December 2004, [week1] promos...
(line 3) January 2005, ...

Note that "[week#] promos" is the linked subform showing the exact
promo date from the source table.

Any help is greatly appreciated!

  #2  
Old November 13th, 2005, 04:03 AM
John Winterbottom
Guest
 
Posts: n/a
Default Re: Grouping dates in query

"John" <soundneedle@hotmail.com> wrote in message
news:90fab935.0411011554.55f897dc@posting.google.c om...[color=blue]
> I'm building a report where each row represents one month and its 1 to
> 5 weeks. A report query groups the source table date into a "month and
> year" expression. A subreport links to the main report using the
> query's "month and year" expression.
>
> Problem is I can't figure out how to group the source table's dates
> into a "Mmmm yyyy" and then link the subreport to the relevant week of
> that "Mmmm Yyyy".
>[/color]

The best way to handle these sorts of temporal problems is often to build
and populate a separate calendar table to hold all the individual time
slices you are ever likely to need - then join to this table in your
queries. This gives much better performance than grouping on a calculated
value.

If you need some help with specific syntax post your simplified table
structure with some sample data and the output you need.


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.