PC Review


Reply
Thread Tools Rate Thread

Creating a date column "out of thin air"

 
 
Impecunious
Guest
Posts: n/a
 
      17th Oct 2006
I'm trying to query a count of transactions by month, regardless of
whether any transaction activity occurred during the month.
Consequently, I don't want to simply group by date and count the
instances of some other record property, because if there weren't any
transactions in June 2006 then this month won't show up in my results.
I'd prefer to see June with either a zero or null value for the count.

Is it possible to create a series of say, the past 12 month-ends,
without getting into a big nasty sysdate chain? In addition, where
would these dates come "from" - is there a dual equivalent in MS
Access?

Thanks in advance.

 
Reply With Quote
 
 
 
 
=?Utf-8?B?SmVycnkgV2hpdHRsZQ==?=
Guest
Posts: n/a
 
      17th Oct 2006
Dual? Obviously an Oracle dude!

If you display your data in a crosstab query, it's possible to make a column
show up even if there isn't any data for that month by using the Column
Heading property of the crosstab query.

Other than that you could create a table of Months and do a Left or Right
join to bring in this data even when there isn't any matching records in the
other table.
--
Jerry Whittle
Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder.


"Impecunious" wrote:

> I'm trying to query a count of transactions by month, regardless of
> whether any transaction activity occurred during the month.
> Consequently, I don't want to simply group by date and count the
> instances of some other record property, because if there weren't any
> transactions in June 2006 then this month won't show up in my results.
> I'd prefer to see June with either a zero or null value for the count.
>
> Is it possible to create a series of say, the past 12 month-ends,
> without getting into a big nasty sysdate chain? In addition, where
> would these dates come "from" - is there a dual equivalent in MS
> Access?
>
> Thanks in advance.
>
>

 
Reply With Quote
 
Sylvain Lafontaine
Guest
Posts: n/a
 
      17th Oct 2006
Mabye using a right join with a table of months?

--
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: http://cerbermail.com/?QugbLEWINF


"Impecunious" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm trying to query a count of transactions by month, regardless of
> whether any transaction activity occurred during the month.
> Consequently, I don't want to simply group by date and count the
> instances of some other record property, because if there weren't any
> transactions in June 2006 then this month won't show up in my results.
> I'd prefer to see June with either a zero or null value for the count.
>
> Is it possible to create a series of say, the past 12 month-ends,
> without getting into a big nasty sysdate chain? In addition, where
> would these dates come "from" - is there a dual equivalent in MS
> Access?
>
> Thanks in advance.
>



 
Reply With Quote
 
Joseph Meehan
Guest
Posts: n/a
 
      17th Oct 2006
Impecunious wrote:
> I'm trying to query a count of transactions by month, regardless of
> whether any transaction activity occurred during the month.
> Consequently, I don't want to simply group by date and count the
> instances of some other record property, because if there weren't any
> transactions in June 2006 then this month won't show up in my results.
> I'd prefer to see June with either a zero or null value for the count.
>
> Is it possible to create a series of say, the past 12 month-ends,
> without getting into a big nasty sysdate chain? In addition, where
> would these dates come "from" - is there a dual equivalent in MS
> Access?
>
> Thanks in advance.


Why not just add in 12 dummy records, one for each month and subtract
one from the count number?

--
Joseph Meehan

Dia duit


 
Reply With Quote
 
Van T. Dinh
Guest
Posts: n/a
 
      17th Oct 2006
See a similar discussion at:

http://www.utteraccess.com/forums/sh...Number=1271046

--
HTH
Van T. Dinh
MVP (Access)



"Impecunious" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I'm trying to query a count of transactions by month, regardless of
> whether any transaction activity occurred during the month.
> Consequently, I don't want to simply group by date and count the
> instances of some other record property, because if there weren't any
> transactions in June 2006 then this month won't show up in my results.
> I'd prefer to see June with either a zero or null value for the count.
>
> Is it possible to create a series of say, the past 12 month-ends,
> without getting into a big nasty sysdate chain? In addition, where
> would these dates come "from" - is there a dual equivalent in MS
> Access?
>
> Thanks in advance.
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
"RECEIVED" column date is set to "None" in Outlook 2003 Johnny37 Microsoft Outlook Discussion 2 16th Apr 2010 02:16 PM
RE: creating a "date selector box" or "pull down box" in a cell Gary''s Student Microsoft Excel Worksheet Functions 0 30th Sep 2009 01:45 AM
Re: creating a "date selector box" or "pull down box" in a cell Pete_UK Microsoft Excel Worksheet Functions 0 30th Sep 2009 01:39 AM
Convert a column from "Short Date" to "Long Date" Curious Microsoft Dot NET 0 25th May 2007 03:23 PM
Need the formula or macro. If i enter today date in the cell (Row 1,Column 2) and on tab out, the column 1 cell should be filled with "corresponding Day" of the date kakasay Microsoft Excel Misc 0 22nd Jan 2007 12:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:38 PM.