I didn't see it working as I only have the dateStart and dateEnd.  I guess
it's time I learn how a numbers table works.

Thx


-----Original Message-----
From: Russ Michaels [mailto:r...@michaels.me.uk] 
Sent: Sunday, September 26, 2010 5:21 AM
To: cf-talk
Subject: Re: cfoutput or cfloop? which is the more practical solution


did the grouped cfoutpout not work for you then ?

On Sun, Sep 26, 2010 at 4:55 AM, GLM <g...@glmdesigns.com> wrote:

>
> Mike thanks for the lead. It had crossed my mind to build a numbers table
> but I didn't think it would work. (I've never used them myself.)
>
> I thought that it was somewhat excessive as there would have to be at
least
> 365x220 rows (over 80,000). In the examples I gave I think one row per
year
> (220) would be more than good enough but there are numerous exceptions
> (people dying in office, getting nominated to higher office, etc...)
>
> I'll give it a shot.
>
> Thx
>
> -----Original Message-----
> From: Mike Chabot [mailto:mcha...@gmail.com]
> Sent: Saturday, September 25, 2010 10:50 PM
> To: cf-talk
> Subject: Re: cfoutput or cfloop? which is the more practical solution
>
>
> You can do this in SQL, although the methods I can think of involve
> advanced techniques so I hesitate to recommend them based on your
> stated SQL experience. One technique involves joining to a "numbers
> table" which will transform the start and end dates into one row per
> year.
>
> You can use the cfloop technique in your first post. It should get the
> job done. It isn't the fastest method, but it could be fast enough.
> One alternative to consider would be to have one big database query,
> then loop over the one query once and build up an array or a structure
> containing the data you want to output, then cfoutput the array or
> structure.
>
> -Mike Chabot
>



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:337563
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to