Urgent help. SUM/TOTAL/PERCENT & variables. What a mouth full.
Posted in 1993
I hate to ask stupid questions. However, I need to compensate the the poor
documentation I have on Informix. Or, any other excuse will do, I suppose.
Anyway, here's the brief and thanks in advance.
I'm doing a query and on field is "priority", a number. I need to get the
total count for the grouping (I'll use count(*), I presume). Then I need to
determine what percentage of the total were priority 1's for that grouping.
At the end of the report I need to give a total for ALL groupings. This similar
requirement is the same for other fields.
The trouble is I don't know how to to write it. Would you do like
to create a temp. variable for pri = "1" then do like
percent (count(*) / variable(value)). I don't know if that is necessary, but
I can't locate information on assigning & using temp variables.
This is seriously quite urgent for me as it is for my boss. :(- Any and all
assistance is appreciated. Best mail me directly at attmail!robertcook, if you
would.
thanks to those who gave me the pointers on dbload. It certainly does make the
work go quicker.
Thanks ALL and have a wonderful Holiday Season.
< RObert