RE: What is best way to write this report?

2001-07-18 Thread Justin Greene

Write your query to return:

Month (as number), Day (as number), other data
order by Day, Month

Then loop through the result and each time the month is  the last 
month
start a new row.

Justin

-Original Message-
From: Paul Sizemore [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 4:06 PM
To: CF-Talk
Subject: What is best way to write this report?


I've got a query that returns a date and a sales figures for the 
previous
365 days. I need to write this information to a report in the format 
of:
Jan 1 Feb 1 Mar 1 Apr 1 May 1 ...
Jan 2 Feb 2 Mar 2 Apr 2 May 2 ...
Jan 3 Feb 3 Mar 3 Apr 3 May 3 ...
Jan 4 Feb 4 Mar 4 Apr 4 May 4 ...
On to the end of the days in the month.
From an architectural stand point, what is the best way to do this? 

Paul

~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



RE: What is best way to write this report?

2001-07-18 Thread Paul Sizemore

Justin,

Thanks for your help; I was envisioning several semi-complicated solutions.
I guess I'll make a concerted effort to learn more sql.

Code as follows:

  select month (compdate) as month, day (compdate) as day, year
(compdate) as year, net_sales 
  from sale_head 
  where locnum = #Form.StoreNum#
  AND   compdate = today - 365 
  order by month, day

Paul

-Original Message-
From: Justin Greene [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 18, 2001 9:13 AM
To: CF-Talk
Subject: RE: What is best way to write this report?

Write your query to return:

Month (as number), Day (as number), other data
order by Day, Month

Then loop through the result and each time the month is  the last
month
start a new row.

Justin

-Original Message-
From: Paul Sizemore [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, July 17, 2001 4:06 PM
To: CF-Talk
Subject: What is best way to write this report?


I've got a query that returns a date and a sales figures for the
previous
365 days. I need to write this information to a report in the format
of:
Jan 1 Feb 1 Mar 1 Apr 1 May 1 ...
Jan 2 Feb 2 Mar 2 Apr 2 May 2 ...
Jan 3 Feb 3 Mar 3 Apr 3 May 3 ...
Jan 4 Feb 4 Mar 4 Apr 4 May 4 ...
On to the end of the days in the month.
From an architectural stand point, what is the best way to do this?

Paul
~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists



What is best way to write this report?

2001-07-17 Thread Paul Sizemore

I've got a query that returns a date and a sales figures for the previous
365 days. I need to write this information to a report in the format of:
Jan 1 Feb 1 Mar 1 Apr 1 May 1 ...
Jan 2 Feb 2 Mar 2 Apr 2 May 2 ...
Jan 3 Feb 3 Mar 3 Apr 3 May 3 ...
Jan 4 Feb 4 Mar 4 Apr 4 May 4 ...
On to the end of the days in the month.
From an architectural stand point, what is the best way to do this? 

Paul


This message and any attachments may be confidential or privileged and are
for the exclusive use of the intended recipient.  If you are not the
addressee or intended recipient, please do not read, copy, use, or disclose
this communication to others.  If you have received this in error, please
notify the sender by replying to this message, and then delete it entirely
from your system.  Delivery of this message and any attachments to any
person other than the intended recipient(s) is not intended in any way to
waive confidentiality or a privilege.  All personal messages express views
only of the sender, which are not to be attributed to Finish Line, and may
not be copied or distributed without this statement.


~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists