House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  SQL

SQL summing madness

  << Previous Post |  RSS |  Subscribe to this Group Next >> 

SQL summing madness

I have to provide a sum of data for a date range, the fiscal year July Ian Skinner 08/30/2007 02:43 PM

08/30/2007 02:43 PM
Author: Ian Skinner Short Link: http://www.houseoffusion.com/groups/sql/thread.cfm/threadid:799#2931 I have to provide a sum of data for a date range, the fiscal year July 1st 2005 through June 30th 2006.  Here is the problem, the table with the data to be summed has NO sensible date data.  It has an integer year column and a varchar text column containing the full string name of each month of the year. For example: YEAR, MONTH, LBS_AI 2005, JUNE, 123 2005, JULY, 342 2005, AUGUST, 124 ... 2006, MAY, 453 2006, JUNE, 235 2006, JULY, 269 This table covers data from 1990 to present in this format.  How would one get a sum of "LBS_AI" for the date range July 2005 through June 2006?  My first instinct is a combination of year and a list of months, would this work properly?  Any other creative solutions?  If it helps this is an Oracle database, 7x I believe. I.E. WHERE (year = 2005 AND month IN ('JULY', 'AUGUST' ... 'DECEMBER') OR (year = 2006 AND month IN ('JANUARY', 'FEBRUARY' ... 'JUNE')
<< Previous Thread Today's Threads Next Thread >>

Search sql

May 25, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference