on 06-27-2010 4:08 PM
Hi
Is it possible to display total group wise through Query Generator. For e.g
B.P A 1000
A 2000
3000
B.P B 2000
B 4000
6000
Total 9000
Thanks
HI Manish......
You can do it only by applying Union Join and mention the Table Name.....
Regards,
Rahul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Closed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Try something like this:
SELECT grouping(T0.Cardcode),grouping (T0.DocNum),
case grouping(T0.Cardcode)
when 0 then min(T0.CardCode)
else '' end,
case when grouping (T0.DocNum)=0
and grouping(T0.Cardcode)=0
then min(T0.docNum)
else '' end,
SUM(T0.DocTotal)
FROM OINV T0
Group BY T0.CardCode,T0.DocNum with rollup
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
It is possible for the total lines by using UNION ALL.
Something like:
SELECT T0.CardCode, T0.DocTotal FROM dbo.OINV T0
UNION ALL
SELECT T0.CardCode + ' Total', SUM(T0.DocTotal) FROM dbo.OINV T0
Group BY T0.CardCode
Order BY T0.CardCode
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
100 | |
11 | |
11 | |
6 | |
6 | |
5 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.