Some CFML Stuffs Me Do

From: af (CAER)17 May 2011 14:37
To: Peter (BOUGHTONP) 61 of 75
XML is great, isn't it? It's so enterprisey.
From: Peter (BOUGHTONP)17 May 2011 14:41
To: af (CAER) 62 of 75
If by "enterprisey" means "bloated worthless shite that appears better on paper but actually takes ten times as much effort to do anything with because it was designed to solve the wrong problem", then yes, it is.
EDITED: 17 May 2011 14:41 by BOUGHTONP
From: af (CAER)17 May 2011 14:46
To: Peter (BOUGHTONP) 63 of 75
That's a nicely enterprisey definition, well done! :D

(although I think adding a few terms like 'blue-sky' and 'process-driven' or maybe 'social media' could corp it up a bit)
From: Ken (SHIELDSIT)25 May 2011 20:08
To: ALL64 of 75
FUCKKKK I have a real fucking strange issue going on with a report I made. And I would like to get a fresh set of eyes on it, but it will be pretty hard to get all the relevant data posted so you would even understand what the fuck I'm talking about. GRRRRRRRRR I hate life.
From: Ken (SHIELDSIT)31 May 2011 16:44
To: Peter (BOUGHTONP) 65 of 75
Have you ever used the CF Report Builder?
From: Ken (SHIELDSIT)31 May 2011 18:00
To: ALL66 of 75
Has anyone checked on PeeB lately? I think his chair attacked him, causing him to fall, and not be able to get up!
From: Peter (BOUGHTONP) 2 Jun 2011 15:47
To: Ken (SHIELDSIT) 67 of 75
My chair did not attack me!

It would never do such a thing to me. :@
From: Ken (SHIELDSIT) 2 Jun 2011 15:48
To: Peter (BOUGHTONP) 68 of 75
Well that was the only logical explanation!
From: Peter (BOUGHTONP) 2 Jun 2011 15:49
To: Ken (SHIELDSIT) 69 of 75
And no, not used CF Report Builder, fortunately.

With CF8/9 Adobe did (attempt to) make it non-shit, but I've not had any reason to see if they succeeded.
From: Ken (SHIELDSIT) 2 Jun 2011 15:50
To: Peter (BOUGHTONP) 70 of 75
I was going to try it, but I'm too dumb to make it work with Ralio.
From: Peter (BOUGHTONP) 2 Jun 2011 16:41
To: Ken (SHIELDSIT) 71 of 75
I've no idea if it'll run against Railo or not - wouldn't be surprised if Adobe had deliberately made it incompatible in some way. :/
From: Drew (X3N0PH0N) 3 Jun 2011 02:15
To: Peter (BOUGHTONP) 72 of 75
From: Ken (SHIELDSIT) 3 Jun 2011 03:03
To: Drew (X3N0PH0N) 73 of 75
haha, I guess there's a comic for every situation!
From: Peter (BOUGHTONP) 3 Jun 2011 07:58
To: Drew (X3N0PH0N) 74 of 75
I don't chew gum.
From: Ken (SHIELDSIT) 3 Jun 2011 17:33
To: Peter (BOUGHTONP) 75 of 75
Peter do you have any idea why this isn't working or how I can make it work?

If you look at this query there is a ConsumedVol that sums everything that is 'consumed' and a ProducedVol that sums everything Produced.

I need to also do this for the ConsumedTotal and ProducedTotal. As the query is now I'm getting those numbers, but they are all lumped together. How can I do multiple sums in this query?

code:
SELECT
	ruhID,rudProductID,ruhDescrip,ruhDate,ruhLocationID,rudTotal AS ConsumedTotal,ConsumedVol=(SELECT SUM(ISNULL(rudVolume,0))
FROM
	ProductionDetail
WHERE
	rudID=ruhID
AND
	rudCategory='Consumed'),rudTotal AS ProducedTotal,ProducedVol=(SELECT SUM(ISNULL(rudVolume,0))
FROM
	ProductionDetail
WHERE
	rudID=ruhID
AND
	rudCategory='Produced')
FROM
	ProductionHeader
LEFT JOIN
	ProductionDetail
ON
	ruhID = rudID
WHERE
	ruhID
LIKE
	'%bg%'
AND
	ruhDate
BETWEEN
	'5/1/11'
AND
	'5/31/11'
GROUP BY
	ruhID,ruhDescrip,ruhDate,ruhLocationID,rudTotal,rudProductID
ORDER BY
	ruhDate DESC, ruhId ASC