Alternative for group by
Hi guys i need some help with the logic. As an example, i have table with Account and product columns. So each Account can have multiple products. Now i need SQL to see Accounts that have only Product.
One way of doing it is by doing a groupby and having count(Account) =1. I need an alternative for this. Please help me with your ideas. Thanks in advance.
Alberto Faenza wrote:
Is there any reason why you don't want to use group by or just your curiosity to find alternatives?Simple case would be: "I need to select everything from account table where account has multiple products". And between:
SELECT *
FROM YOUR_TABLE
WHERE ACCOUNT IN (
SELECT ACCOUNT,
FROM YOUR_TABLE
GROUP BY ACCOUNT
HAVING COUNT(*) > 1
/and
SELECT *
FROM (
SELECT ACCOUNT,
COUNT(*) OVER(PARTITION BY ACCOUNT) CNT
FROM YOUR_TABLE
WHERE CNT > 1
/I prefer the latter.
SY.
Similar Messages
-
Alternative for 'group by' needed
Remove group by and sum using Itab
Hello,
One report has a select clause which is retrieving SUM (field) AS field in the field list and USING group by 6-7 fields...
I want to remove this group by clause, take all records ( without sum ) into another internal table, sort it by these 6 fields ( will define them at the start of structure), loop through it and then use AT NEW for these 6 fields and use collect for summing the field.
Please give mee some hints or if there is any other alternative.?
Please advice.
Thanks,
Rupalee.HI,
You need to use the SORT and Internal Table Events ..
SORT ITAB BY FIELD1 FIELD2.
LOOP AT ITAB.
L_SUM = L_SUM + ITAB-FIELD3.
AT END OF FIELD2.
MOVE DATA TO ITAB2.
APPEND ITAB2.
ENDAT.
ENDLOOP. -
OUD DPS alternative for DSEE Group Filters
Hi,
I would like to know what is an alternative for group dn filter within OUD DPS mode against DSEE DPS. How can we set up this functionality within OUD DPS mode, any pointers will be helpful. I would like to create a network group which will allow access to users having association to a particular group.
Thanks.
group-dn-filters : cn= Access Group,ou=groups,o=example.com
group-search-bind-dn : uid=access-group-user,ou=People,o=example.comHi Sylvain,
The use case is something like this :
We've several LDAP Servers specially for reporting purpose, based on the functionality as listed below members of "cn= Access Group" group will have access to the LDAP Server only, any other users will be redirected to other connection handlers and a different ldap within dsee dps. The group bind dn user as listed below will verify the membership.
Could you let me know how to accomplish this with Access Control as there will not be any re-routing among the Network Group if things are defined at the Access Level? Can we do this on OUD DPS level?
group-dn-filters : cn= Access Group,ou=groups,o=example.com
group-search-bind-dn : uid=access-group-user,ou=People,o=example.com -
Hi all,
I have a table name as angdata77 having attributes like asigno..
i want to retrieve data from angdata77 by using both group by & order by clauses.. for total count..
am using the query as
select asigno,count(*) from angdata77 group by asigno order by asigno;
Is there any other query for retrieving the data from angdata77
Thanks in Advance,
Venkatesh J.885756 wrote:
Ya it's good.. Performance also good while retrieving data...
I want to know other Possibilities also sir...There will be no better alternative for this, because this is the most simple and straight forward way to get the output you are looking for..
Go ahead without any confusion... :) -
Alternative for HLS HTML streaming trough JW player for users without Flash?
Hello!
I am using HLS TS Streaming trough JW player for the largest group of users that have flash for streaming video's.
Is there an alternative for users without flash?
Best regardsI will just summarize myself...
Adobe media server supports rtmp and HTTP(HLS and HDS)..
for rtmp streaming the swf running in a Flash player is the standard interface...that flash player may be an activeX control/plugin in your browser or may be a standalone player downloaded from adobe website...Chrome web browser however users a slightly different( PPAPI based) flash player(which is different from Adobe flash player) and is developed and maintained by google.
For HLS and HDS, you can either use special players(i.e swfs)(Flash based) developed Adobe by Adobe e.g Strobe meida player(Open Source Media Framework Blog | Adobe’s free and open source media playback system) or you can use players like jwplayer(Video Player Download | JW Player Online Video Player)... Incidentally jwplayer has added simultaneous support for playing rtmp streams too(which is reallly good), but i do not have much insight into workings of jwplayer... -
Hi
I have to simple sets of query Q1 and Q2, both of them have the SUM function used, they work just fine separately, but we want the result in 1 single query.
The problem is that Q1 has a master/detail table relation in the join so whenever we join both queries together the result set is being summed incorrectly according to the number of detail records found in the detail table.
Of course the solution is to use UNION operator.
What I'm looking for is an alternative for the UNION
Are there any analytical functions where I can have the result???
Query examples:
TONY@DEV> SELECT X.AUXL_RPRSNT_TITLE GRP_CODE,
2 M.AUXL_CODE,
3 D.ITEM_CODE,
4 SUM(DECODE(M.TMVS_OPERATION,6,D.MVTS_QUANTITY_R,11,-D.MVTS_QUANTITY_R)) QTY
5 FROM ISTD_STOCK_MOUVEMENTS_M M ,
6 ISTD_STOCK_MOUVEMENTS_D D,
7 IACD_AUXILIARIES X
8 WHERE M.TMVS_CODE = D.TMVS_CODE
9 AND M.CPNY_CODE = D.CPNY_CODE
10 AND M.BRCH_CODE = D.BRCH_CODE
11 AND M.MVTS_YEAR = D.MVTS_YEAR
12 AND M.MVTS_DOC_NUM = D.MVTS_DOC_NUM
13 AND X.AUXL_TYPE = M.AUXL_TYPE
14 AND X.AUXL_CODE = M.AUXL_CODE
15 AND X.AUXL_RPRSNT_TITLE = 1
16 AND M.AUXL_TYPE = 1
17 GROUP BY X.AUXL_RPRSNT_TITLE, M.AUXL_CODE, D.ITEM_CODE;
GRP_CODE AUXL_CODE ITEM_CODE QTY
1 33405 4030010 318
1 33405 4030020 22
1 33405 4030030 22
1 33408 4030010 14
1 33408 4030020 2
1 33408 4030030 2
1 33410 4030010 992
1 33410 4030020 42
1 33410 4030030 42
1 33413 4030010 789
1 33413 4030020 38
GRP_CODE AUXL_CODE ITEM_CODE QTY
1 33413 4030030 38
1 33413 5010008 1
1 33413 5010009 1
1 33413 5010012 1
15 rows selected.
Elapsed: 00:00:00.00
TONY@DEV> SELECT X.AUXL_RPRSNT_TITLE GRP_CODE,
2 X.AUXL_CODE,
3 SUM(NVL(A.AGAC_REV_AMT, 0)) AMT,
4 SUM(NVL(A.AGAC_AMT, 0)) PAID,
5 SUM(NVL(A.AGAC_REV_AMT, 0) - NVL(A.AGAC_AMT, 0)) DUE
6 FROM IACD_PAYM_AGING A,
7 IACD_AUXILIARIES X
8 WHERE X.AUXL_TYPE = A.AUXL_TYPE
9 AND X.AUXL_CODE = A.AUXL_CODE
10 AND X.AUXL_RPRSNT_TITLE = 1
11 GROUP BY X.AUXL_RPRSNT_TITLE, X.AUXL_CODE;
GRP_CODE AUXL_CODE AMT PAID DUE
1 33405 845.248 93.34 751.908
1 33408 37.334 13.34 23.994
1 33410 2655.328 394.68 2260.648
1 33413 2103.855 293.302 1810.553
Elapsed: 00:00:00.00
TONY@DEV> SELECT X.AUXL_RPRSNT_TITLE GRP_CODE,
2 M.AUXL_CODE,
3 D.ITEM_CODE,
4 SUM(DECODE(M.TMVS_OPERATION,6,D.MVTS_QUANTITY_R,11,-D.MVTS_QUANTITY_R)) QUANTITY,
5 NULL AMT,
6 NULL PAID,
7 NULL DUE
8 FROM ISTD_STOCK_MOUVEMENTS_M M ,
9 ISTD_STOCK_MOUVEMENTS_D D,
10 IACD_AUXILIARIES X
11 WHERE M.TMVS_CODE = D.TMVS_CODE
12 AND M.CPNY_CODE = D.CPNY_CODE
13 AND M.BRCH_CODE = D.BRCH_CODE
14 AND M.MVTS_YEAR = D.MVTS_YEAR
15 AND M.MVTS_DOC_NUM = D.MVTS_DOC_NUM
16 AND X.AUXL_TYPE = M.AUXL_TYPE
17 AND X.AUXL_CODE = M.AUXL_CODE
18 AND X.AUXL_RPRSNT_TITLE = 1
19 AND M.AUXL_TYPE = 1
20 GROUP BY X.AUXL_RPRSNT_TITLE, M.AUXL_CODE, D.ITEM_CODE
21 UNION
22 SELECT X.AUXL_RPRSNT_TITLE GRP_CODE,
23 X.AUXL_CODE,
24 NULL ITEM_CODE,
25 NULL QUANTITY,
26 SUM(NVL(A.AGAC_REV_AMT, 0)) AMT,
27 SUM(NVL(A.AGAC_AMT, 0)) PAID,
28 SUM(NVL(A.AGAC_REV_AMT, 0) - NVL(A.AGAC_AMT, 0)) DUE
29 FROM IACD_PAYM_AGING A,
30 IACD_AUXILIARIES X
31 WHERE X.AUXL_TYPE = A.AUXL_TYPE
32 AND X.AUXL_CODE = A.AUXL_CODE
33 AND X.AUXL_RPRSNT_TITLE = 1
34 GROUP BY X.AUXL_RPRSNT_TITLE, X.AUXL_CODE;
GRP_CODE AUXL_CODE ITEM_CODE QUANTITY AMT PAID DUE
1 33405 4030010 318
1 33405 4030020 22
1 33405 4030030 22
1 33405 845.248 93.34 751.908
1 33408 4030010 14
1 33408 4030020 2
1 33408 4030030 2
1 33408 37.334 13.34 23.994
1 33410 4030010 992
1 33410 4030020 42
1 33410 4030030 42
GRP_CODE AUXL_CODE ITEM_CODE QUANTITY AMT PAID DUE
1 33410 2655.328 394.68 2260.648
1 33413 4030010 789
1 33413 4030020 38
1 33413 4030030 38
1 33413 5010008 1
1 33413 5010009 1
1 33413 5010012 1
1 33413 2103.855 293.302 1810.553
19 rows selected.
Elapsed: 00:00:05.03
TONY@DEV>Here are samples from the joined query
TONY@DEV> ed
Wrote file afiedt.buf
1 SELECT X.AUXL_RPRSNT_TITLE GRP_CODE,
2 M.AUXL_CODE,
3 D.ITEM_CODE,
4 SUM(DECODE(M.TMVS_OPERATION,6,D.MVTS_QUANTITY_R,11,-D.MVTS_QUANTITY_R)) QUANTITY,
5 SUM(NVL(A.AGAC_REV_AMT, 0)) AMT,
6 SUM(NVL(A.AGAC_AMT, 0)) PAID,
7 SUM(NVL(A.AGAC_REV_AMT, 0) - NVL(A.AGAC_AMT, 0)) DUE
8 FROM ISTD_STOCK_MOUVEMENTS_M M ,
9 ISTD_STOCK_MOUVEMENTS_D D,
10 IACD_AUXILIARIES X,
11 IACD_PAYM_AGING A
12 WHERE M.TMVS_CODE = D.TMVS_CODE
13 AND M.CPNY_CODE = D.CPNY_CODE
14 AND M.BRCH_CODE = D.BRCH_CODE
15 AND M.MVTS_YEAR = D.MVTS_YEAR
16 AND M.MVTS_DOC_NUM = D.MVTS_DOC_NUM
17 AND X.AUXL_TYPE = M.AUXL_TYPE
18 AND X.AUXL_CODE = M.AUXL_CODE
19 AND X.AUXL_TYPE = A.AUXL_TYPE
20 AND X.AUXL_CODE = A.AUXL_CODE
21 AND X.AUXL_RPRSNT_TITLE = 1
22 AND M.AUXL_TYPE = 1
23* GROUP BY X.AUXL_RPRSNT_TITLE, M.AUXL_CODE, D.ITEM_CODE
TONY@DEV> /
GRP_CODE AUXL_CODE ITEM_CODE QUANTITY AMT PAID DUE
1 33405 4030010 10494 30428.928 3360.24 27068.688
1 33405 4030020 726 845.248 93.34 751.908
1 33405 4030030 726 845.248 93.34 751.908
1 33408 4030010 140 373.34 133.4 239.94
1 33408 4030020 20 37.334 13.34 23.994
1 33408 4030030 20 37.334 13.34 23.994
1 33410 4030010 56544 164630.336 24470.16 140160.176
1 33410 4030020 2394 10621.312 1578.72 9042.592
1 33410 4030030 2394 13276.64 1973.4 11303.24
1 33413 4030010 56808 151477.56 21117.744 130359.816
1 33413 4030020 2736 10519.275 1466.51 9052.765
GRP_CODE AUXL_CODE ITEM_CODE QUANTITY AMT PAID DUE
1 33413 4030030 2736 10519.275 1466.51 9052.765
1 33413 5010008 72 2103.855 293.302 1810.553
1 33413 5010009 72 2103.855 293.302 1810.553
1 33413 5010012 72 2103.855 293.302 1810.553
15 rows selected.
Elapsed: 00:00:03.09
TONY@DEV> ED
Wrote file afiedt.buf
1 SELECT X.AUXL_RPRSNT_TITLE GRP_CODE,
2 M.AUXL_CODE,
3 D.ITEM_CODE,
4 SUM(DECODE(M.TMVS_OPERATION,6,D.MVTS_QUANTITY_R,11,-D.MVTS_QUANTITY_R)) QUANTITY,
5 SUM(NVL(A.AGAC_REV_AMT, 0)) AMT,
6 SUM(NVL(A.AGAC_AMT, 0)) PAID,
7 SUM(NVL(A.AGAC_REV_AMT, 0) - NVL(A.AGAC_AMT, 0)) DUE
8 FROM ISTD_STOCK_MOUVEMENTS_M M ,
9 ISTD_STOCK_MOUVEMENTS_D D,
10 IACD_AUXILIARIES X,
11 IACD_PAYM_AGING A
12 WHERE M.TMVS_CODE = D.TMVS_CODE
13 AND M.CPNY_CODE = D.CPNY_CODE
14 AND M.BRCH_CODE = D.BRCH_CODE
15 AND M.MVTS_YEAR = D.MVTS_YEAR
16 AND M.MVTS_DOC_NUM = D.MVTS_DOC_NUM
17 AND X.AUXL_TYPE = M.AUXL_TYPE
18 AND X.AUXL_CODE = M.AUXL_CODE
19 AND X.AUXL_TYPE = A.AUXL_TYPE
20 AND X.AUXL_CODE = A.AUXL_CODE
21 AND A.AUXL_CODE = M.AUXL_CODE
22 AND A.AUXL_TYPE = M.AUXL_TYPE
23 AND X.AUXL_RPRSNT_TITLE = 1
24 AND M.AUXL_TYPE = 1
25* GROUP BY X.AUXL_RPRSNT_TITLE, M.AUXL_CODE, D.ITEM_CODE
TONY@DEV> /
GRP_CODE AUXL_CODE ITEM_CODE QUANTITY AMT PAID DUE
1 33405 4030010 10494 30428.928 3360.24 27068.688
1 33405 4030020 726 845.248 93.34 751.908
1 33405 4030030 726 845.248 93.34 751.908
1 33408 4030010 140 373.34 133.4 239.94
1 33408 4030020 20 37.334 13.34 23.994
1 33408 4030030 20 37.334 13.34 23.994
1 33410 4030010 56544 164630.336 24470.16 140160.176
1 33410 4030020 2394 10621.312 1578.72 9042.592
1 33410 4030030 2394 13276.64 1973.4 11303.24
1 33413 4030010 56808 151477.56 21117.744 130359.816
1 33413 4030020 2736 10519.275 1466.51 9052.765
GRP_CODE AUXL_CODE ITEM_CODE QUANTITY AMT PAID DUE
1 33413 4030030 2736 10519.275 1466.51 9052.765
1 33413 5010008 72 2103.855 293.302 1810.553
1 33413 5010009 72 2103.855 293.302 1810.553
1 33413 5010012 72 2103.855 293.302 1810.553
15 rows selected.
Elapsed: 00:00:00.02
TONY@DEV>
Note: If I join the A table with D table the query's returning no rows
Any suggestions are apreciated
Tony S. GarabedianHi Laurent,
I've got the same results as the joined tables without UNION.
The AUXL_CODE column is detail in the D table and master in M table the query is counting the detail records over and over when joined with table A where the function SUM is executed against columns in this table even with grouping sets
Am I correct??
I'm sure there is (must be) another way other than UNION and all the lengthy query but I just can't figure it out.
samples
1 SELECT X.AUXL_RPRSNT_TITLE,
2 X.AUXL_CODE,
3 D.ITEM_CODE,
4 DECODE(GROUPING(X.AUXL_CODE), 1, SUM(DECODE(M.TMVS_OPERATION,6,D.MVTS_QUANTITY_R,11,-D.MVTS_QUANTITY_R))) QTY,
5 SUM(NVL(A.AGAC_REV_AMT, 0)) AMT, SUM(NVL(A.AGAC_AMT, 0)) PAID,
6 SUM(NVL(A.AGAC_REV_AMT, 0) - NVL(A.AGAC_AMT, 0)) DUE
7 FROM ISTD_STOCK_MOUVEMENTS_M M ,
8 ISTD_STOCK_MOUVEMENTS_D D,
9 IACD_AUXILIARIES X,
10 IACD_PAYM_AGING A
11 WHERE M.TMVS_CODE = D.TMVS_CODE
12 AND M.CPNY_CODE = D.CPNY_CODE
13 AND M.BRCH_CODE = D.BRCH_CODE
14 AND M.MVTS_YEAR = D.MVTS_YEAR
15 AND M.MVTS_DOC_NUM = D.MVTS_DOC_NUM
16 AND X.AUXL_TYPE = M.AUXL_TYPE
17 AND X.AUXL_CODE = M.AUXL_CODE
18 AND X.AUXL_TYPE = A.AUXL_TYPE
19 AND X.AUXL_CODE = A.AUXL_CODE
20 AND A.AUXL_CODE = M.AUXL_CODE
21 AND A.AUXL_TYPE = M.AUXL_TYPE
22 AND X.AUXL_RPRSNT_TITLE = 1
23 AND M.AUXL_TYPE = 1
24* GROUP BY GROUPING SETS((X.AUXL_RPRSNT_TITLE), (X.AUXL_RPRSNT_TITLE, X.AUXL_CODE), (X.AUXL_RPRSNT_TITLE, X.AUXL_CODE, D.ITEM_CODE))
TONY@RIM> /
AUXL_RPRSNT_TITLE AUXL_CODE ITEM_CODE QTY AMT PAID DUE
1 33405 4030010 32162.102 3453.58 28708.522
1 33405 4030020 869.246 93.34 775.906
1 33405 4030030 869.246 93.34 775.906
1 33405 33900.594 3640.26 30260.334
1 33408 4030010 373.34 133.4 239.94
1 33408 4030020 37.334 13.34 23.994
1 33408 4030030 37.334 13.34 23.994
1 33408 448.008 160.08 287.928
1 33410 4030010 171351.747 24864.84 146486.907
1 33410 4030020 10879.476 1578.72 9300.756
1 33410 4030030 13599.345 1973.4 11625.945
AUXL_RPRSNT_TITLE AUXL_CODE ITEM_CODE QTY AMT PAID DUE
1 33410 195830.568 28416.96 167413.608
1 33413 4030010 157668.977 21411.046 136257.931
1 33413 4030020 10799.245 1466.51 9332.735
1 33413 4030030 10799.245 1466.51 9332.735
1 33413 5010008 2159.849 293.302 1866.547
1 33413 5010009 2159.849 293.302 1866.547
1 33413 5010012 2159.849 293.302 1866.547
1 33413 185747.014 25223.972 160523.042
1 141375 415926.184 57441.272 358484.912
20 rows selected.
TONY@RIM> SELECT X.AUXL_RPRSNT_TITLE GRP_CODE,
2 M.AUXL_CODE,
3 D.ITEM_CODE,
4 SUM(DECODE(M.TMVS_OPERATION,6,D.MVTS_QUANTITY_R,11,-D.MVTS_QUANTITY_R)) QUANTITY,
5 SUM(NVL(A.AGAC_REV_AMT, 0)) AMT,
6 SUM(NVL(A.AGAC_AMT, 0)) PAID,
7 SUM(NVL(A.AGAC_REV_AMT, 0) - NVL(A.AGAC_AMT, 0)) DUE
8 FROM ISTD_STOCK_MOUVEMENTS_M M ,
9 ISTD_STOCK_MOUVEMENTS_D D,
10 IACD_AUXILIARIES X,
11 IACD_PAYM_AGING A
12 WHERE M.TMVS_CODE = D.TMVS_CODE
13 AND M.CPNY_CODE = D.CPNY_CODE
14 AND M.BRCH_CODE = D.BRCH_CODE
15 AND M.MVTS_YEAR = D.MVTS_YEAR
16 AND M.MVTS_DOC_NUM = D.MVTS_DOC_NUM
17 AND X.AUXL_TYPE = M.AUXL_TYPE
18 AND X.AUXL_CODE = M.AUXL_CODE
19 AND X.AUXL_TYPE = A.AUXL_TYPE
20 AND X.AUXL_CODE = A.AUXL_CODE
21 AND A.AUXL_CODE = M.AUXL_CODE
22 AND A.AUXL_TYPE = M.AUXL_TYPE
23 AND X.AUXL_RPRSNT_TITLE = 1
24 AND M.AUXL_TYPE = 1
25 GROUP BY X.AUXL_RPRSNT_TITLE, M.AUXL_CODE, D.ITEM_CODE;
GRP_CODE AUXL_CODE ITEM_CODE QUANTITY AMT PAID DUE
1 33405 4030010 11118 32162.102 3453.58 28708.522
1 33405 4030020 748 869.246 93.34 775.906
1 33405 4030030 748 869.246 93.34 775.906
1 33408 4030010 140 373.34 133.4 239.94
1 33408 4030020 20 37.334 13.34 23.994
1 33408 4030030 20 37.334 13.34 23.994
1 33410 4030010 58812 171351.747 24864.84 146486.907
1 33410 4030020 2436 10879.476 1578.72 9300.756
1 33410 4030030 2436 13599.345 1973.4 11625.945
1 33413 4030010 59130 157668.977 21411.046 136257.931
1 33413 4030020 2774 10799.245 1466.51 9332.735
GRP_CODE AUXL_CODE ITEM_CODE QUANTITY AMT PAID DUE
1 33413 4030030 2774 10799.245 1466.51 9332.735
1 33413 5010008 73 2159.849 293.302 1866.547
1 33413 5010009 73 2159.849 293.302 1866.547
1 33413 5010012 73 2159.849 293.302 1866.547
15 rows selected.
TONY@RIM>This is with UNION and these are the correct results
TONY@RIM> ed
Wrote file afiedt.buf
1 SELECT X.AUXL_RPRSNT_TITLE GRP_CODE,
2 M.AUXL_CODE,
3 D.ITEM_CODE,
4 SUM(DECODE(M.TMVS_OPERATION,6,D.MVTS_QUANTITY_R,11,-D.MVTS_QUANTITY_R)) QUANTITY,
5 NULL AMT,
6 NULL PAID,
7 NULL DUE
8 FROM ISTD_STOCK_MOUVEMENTS_M M ,
9 ISTD_STOCK_MOUVEMENTS_D D,
10 IACD_AUXILIARIES X
11 WHERE M.TMVS_CODE = D.TMVS_CODE
12 AND M.CPNY_CODE = D.CPNY_CODE
13 AND M.BRCH_CODE = D.BRCH_CODE
14 AND M.MVTS_YEAR = D.MVTS_YEAR
15 AND M.MVTS_DOC_NUM = D.MVTS_DOC_NUM
16 AND X.AUXL_TYPE = M.AUXL_TYPE
17 AND X.AUXL_CODE = M.AUXL_CODE
18 AND X.AUXL_RPRSNT_TITLE = 1
19 AND M.AUXL_TYPE = 1
20 GROUP BY X.AUXL_RPRSNT_TITLE, M.AUXL_CODE, D.ITEM_CODE
21 UNION
22 SELECT X.AUXL_RPRSNT_TITLE GRP_CODE,
23 X.AUXL_CODE,
24 NULL ITEM_CODE,
25 NULL QUANTITY,
26 ROUND(SUM(NVL(A.AGAC_REV_AMT, 0)), 2) AMT,
27 ROUND(SUM(NVL(A.AGAC_AMT, 0)), 2) PAID,
28 ROUND(SUM(NVL(A.AGAC_REV_AMT, 0) - NVL(A.AGAC_AMT, 0)), 2) DUE
29 FROM IACD_PAYM_AGING A,
30 IACD_AUXILIARIES X
31 WHERE X.AUXL_TYPE = A.AUXL_TYPE
32 AND X.AUXL_CODE = A.AUXL_CODE
33 AND X.AUXL_RPRSNT_TITLE = 1
34* GROUP BY X.AUXL_RPRSNT_TITLE, X.AUXL_CODE
TONY@RIM> /
GRP_CODE AUXL_CODE ITEM_CODE QUANTITY AMT PAID DUE
1 33405 4030010 327
1 33405 4030020 22
1 33405 4030030 22
1 33405 869.25 93.34 775.91
1 33408 4030010 14
1 33408 4030020 2
1 33408 4030030 2
1 33408 37.33 13.34 23.99
1 33410 4030010 1014
1 33410 4030020 42
1 33410 4030030 42
GRP_CODE AUXL_CODE ITEM_CODE QUANTITY AMT PAID DUE
1 33410 2719.87 394.68 2325.19
1 33413 4030010 810
1 33413 4030020 38
1 33413 4030030 38
1 33413 5010008 1
1 33413 5010009 1
1 33413 5010012 1
1 33413 2159.85 293.3 1866.55
19 rows selected.
TONY@RIM>Thanks again,
Tony
Message was edited by:
Tony Garabedian -
Alternative Item group not appearing CS11
Hi all,
We have created BOM with all the substitution materials which can be used at the time of Production.
We have utilised the Alternative item group for this. When i look at BOM for a material say X using CS03 i can see the Alternative Item group. But when i explode the BOM using CS11 i cannot see the alternative item group in it.
The scenario in details is :
For the header material X i have X1,as component with different change numbers and unique validity dates and this component is seen in 3 lines in BOM with alternative item groups against it.
Now when i explode the BOM using CS11 i can see X1 component with alternative group for only 2 line items.
We are in ECC6.0 version, can i ask you whether there is any patch or oss note to be applied.I have tried searching OSS notes but couldnt find them
Please advice as this is of very high importance.
Thanking you
Regards
Raj KiranDear Raj,
What I wanted to confirm from you is ,after executing CS11--->
Changing Layout -
> Selecting Alternative Item group,
priority,Usage probablitity,the values are not shown in the field
properly though they are actually present in the BOM?
So enter the proper valid from dates in CS11(Select the date
on which the alternative item group is active) & also alternative
BOM number properly.
So go ahead as I suggested and even after entering the proper
valid from dates,Alt.BOM---changing layout ,if its not giving
proper results,then go for checking OSS notes.
This is with respect to ECC 6.0.
Check & revert back.
Regards
Mangal -
Hello Experts,
I have one issue in BOM alternative item group I have made the settings as below.
Material 1 AltItemGroup 01
Priority 1
Strategy 2 100% check
Usage prob. 100
Material 2 AltItemGroup 01
Priority 2
Strategy 2 100% check
Usage prob. 100
For Material 1 required bill of material quantity is 65 MT
For Material 2 required bill of material quantity is 65 MT
Now I am creating the process order for quantity 1000 MT. When the material availability check done it proposing as below in process order.
Material 1 = 65 MT (Available Stock 807.109 MT)
Material 2 = 0 MT (Available Stock 5.850 MT)
And again Material 2 = 32.5 MT
My question is as per above settings and stock situation of the material it should propose only Material 1 = 65 MT. But here system is also proposing Material 2 = 32.5 MT. Can any one tell what I am doing wrong?
Any settings are missing or what will be output for the above settings.
Please explain in detail.
Thanks in Advance
Regards,
GaneshHi Ganesh,
Pl. make the following settings:
Material 1 AltItemGroup 01
Priority 1
Strategy 2 100% check
Usage prob. 100
Material 2 AltItemGroup 01
Priority 2
Strategy 2 100% check
Usage prob. 0
The strategy 2 will automatically handle the situation when Material 1 is not available and 2 is available.
Pl. test & revert. It will work as per your requirements
Regards,
HKV... -
Alternative to Group By?
Hi
I have a query that has in its Select the Max function and of course a Group By. Whilst the query itself is returns the correct results, when running this through the correct cost analysis it is showing that the cost is very high. I have checked that it is this combination that is causing this and there are no joins. Therefore, is there alternative to using Group Bys, or is there away to make these kind of queries more efficient?
Can anyone advise me?user633278 wrote:
It is a general question rather than asking for actual help to an SQL query. My question is whether there is an alternative to GROUP BY and MAX when the cost is high?Sometimes you can quickly get a MAX value of a certain column by using an index.
For instance, suppose you'd want to get the max salary of all employees working in a certain departement.
And also suppose you have this index available to you:
create index emp01 on emp(deptno,sal);Instead of writing this query:
select max(sal) into pl_maxsal
from emp
where deptno = :b1;
...This query might perform an index range scan to retrieve all employees in that department and then perform a sort or hash group by to get the max salary.
You can also write it like this:
cursor c1(p_deptno number) is
select sal from emp where deptno = p_deptno order by sal desc;
open c1;
fetch c1 into pl_maxsal;
close c1;
..This query might do an index range scan descending, to just get the first row, which will have the max salary of that department.
Edited by: Toon Koppelaars on May 19, 2011 6:11 AM -
Editing the display time for grouped objects
Hello, I am having issues editing the display time for grouped items. I am using Captivate 7 and I love how now the grouped items only show as one item in the timeline because it reduces the number of rows visiblein the timeline for each object on a slide. However, now that the grouped objects no longer individually appear in the timeline, I can't make any display adjustments to the grouped objects as a whole.
Has anyone else had this issue and is there a work around? My main issue is that if I have to extend or shorten the audio for the slide, and I have assigned an advanced action to the grouped object, in order to adjust the grouped object to match the audio, I have to now ungroup, make the adjustment, regroup, then reset the advanced action using the new group name. It is frustrating and time consuming.To expand and view the grouped items on the timeline, you need to click the Arrow symbol next to the group name. Once you expand, you can select the individual object and adjust the timings.
Alternatively, you can select the individual object of the group on the slide and adjust the timings from the Timing accordion. You can do this without ungrouping.
Sreekanth -
how to create an alternative iteam group for the bom .
what is the use of itHi
You can go through the following notes which is self explanatory.
Alternative item: group
Consolidation of alternative items within a BOM. Every material in the assembly can be included in the alternative item group.
Use
As soon as you enter an alternative item group, you see an additional dialog box with the following data: ranking order, strategy, usage probability.
You can maintain alternative items in the following situations:
Alternative positions with specific usage probability
These alternative items are incorporated with a specific usage probability. Enter the usage probability for each alternative item in the group, so that:
dependent requirements are determined in requirements planning
dependent requirements are changed to a reservation in the production order
Alternative positions as information
You can enter an alternative item for information purposes. This item would then, for example, only be taken into account in situations involving missing parts.
As there should be neither dependent requirements nor a reservation for this item, enter no usage probability.
Procedure
Enter the same character string to denote the alternative items of an alternative item group.
Enter the same strategy for all alternative items in the alternative item group.
Dependencies
Alternative items are valuated in the following way:
Dependent requirements determination
Requirements planning determines the dependent requirements according to the usage probabilities that have been entered.
If the usage probability is 0%, then no procurement is planned for the item. For information purposes, however, dependent requirements with 0 as quantity are created.
Withdrawal posting
You can control the withdrawal posting for the resevation in the production order in the following way:
Withdrawal according to usage probability (manual change is possible)
Withdrawal if there is 100% availability
Pl. try in these lines .
If you still have problem pl. get back.
Regards
YMREDDY -
How to add a new option for group by in a excel report
Hi,
there is a enhancement in a excel report
I need to add a new option for group by
help me
Regards,
Raghuk
-
What is the alternative for DisplayMemberPath="Value" for Windows Store applications?
I think there is a bug with Windows Store Applications when it comes to using DisplayMemberPath="Value".
Here is my code
<ComboBox Height="40" VerticalAlignment="Stretch" SelectedValuePath="Key" DisplayMemberPath="Value" x:Name="comboBox1" FontSize="25"/>
var source = new Dictionary<string, double>();
source.Add("Item1", 0.4);
source.Add("Item2", 0.3);
source.Add("Item3", 0.1);
source.Add("Item4", 0.1);
var formateDSource = new Dictionary<string, string>();
foreach (var item in source)
formateDSource.Add(string.Format("[{0}, {1}]", item.Key, item.Value), item.Key);
comboBox1.ItemsSource = source;
If you use this code in WPF in works perfectly. However if you use this code in a Windows Store Application then the Combo Box is empty and an error is thrown. So is there an alternative way to do this in Windows Store Applications and have I unearthed a
bug? Because I have researched the Web for days and found no solution to this.*please do not comment unless you have tried my code as a Windows Store App not a WPF in Visual Studios. Can Someone post an example based on my code that works in Windows Store
Apps please because this is terrible.
ThanksIt looks like you got an answer on SO:
http://stackoverflow.com/questions/29817124/what-is-the-alternative-for-displaymemberpath-value-for-windows-store-applicat
This does look like a bug.
Matt Small - Microsoft Escalation Engineer - Forum Moderator
If my reply answers your question, please mark this post as answered.
NOTE: If I ask for code, please provide something that I can drop directly into a project and run (including XAML), or an actual application project. I'm trying to help a lot of people, so I don't have time to figure out weird snippets with undefined
objects and unknown namespaces. -
What are the Flash alternatives for iphone and ipad?
Hello,
I would like to know what could be the Flash alternatives for iphone, ipod, and ipad. I would like to create iphone applications that have 3D animation I usually create with Flash.
But since Apple does not support the use of flash, I need to know what applications or programming languages I must use to create movies or animations for iphone or ipad.I would like to create iphone applications
Then you need to go here:
http://developer.apple.com/programs/iphone/ -
Calculation of Depreciation for Group Asset
Hi Experts,
I am getting a problem while doing depreciation for group asset
Ex: 80,000; Rate 10%
total depreiaiton p.a is Rs 8000/-
as per the Indian standards if it is below 180 days it should take Rs 4000/-, but in my system it is showing Rs 3333.33
my depreciation start date & capitlization date is 01.11.2007.
Regards,
Satya Vani.Dear,
Reshma.
Looking at your Questions let us take explanation for Group Assets :-
1 ) We need to create new different asset class for Group Class in OAOA. Then permit the depreciation area for only Group Asset in OAYM as it is in your current scenario India is Depreciation Area 15 Just select your company code in OAYM and check the Grp Asset field for respective area 15. Then go to OAAX here we have to maintain the assets classes particularly for Group Assets. So check your Group Asset classes for Group Assets. Cerate different Group asset classes for your said requirement.
In these depreciation areas, it is then possible to make an assignment to a group asset. You make this assignment in the specifications for the depreciation area in the asset master record. When you post an acquisition to this kind of asset, the system duplicates the line items from this depreciation area on the given group asset.
2 ) According to me you have to create different depreciation keys for Group Asset classes. Assign the Depreciation keys to your newly created Group Asset Classes in OAYZ and make sure you are deactivating 01 area which is Book Depreciation area.
3 ) As far as I know this is the only functionality available to handle Group Assets. How ever SAP does not have any standard Group Assets functionality. SAP does not supply asset classes to be used solely for group assets. It is we have to determine as per varying Business Process.
I hope this will clear your doubt makes you to understand. Please revert back for further clarification. Welcome you.
Regards,
Pankaj A Bhalerao.
Edited by: pankaj_ab on Feb 3, 2010 8:26 AM
Maybe you are looking for
-
How to pair a new remote for Apple TV First Gen Without the Old Remote?
We bought the first generation apple tv when it first came out. When we got it, it came with the old small plastic remote. A few years back we lost the plastic remote and decided to one of the new metal remotes but 1 problem. We can pair the new remo
-
Dealing with J2SE CORBA errors at the WARNING level?
Sun CORBA Community: For several years now (since we upgraded to J2SE 1.5.*) our log files have been filling up with CORBA.COMM_FAILURE errors from the Sun ORB that are thrown at the WARNING level. This has been reported as either a problem or an ann
-
Wireless capability fail?
Last night my Time Capsule began acting strangely. It cut out my wireless internet connection but was still transmitting signal to those devices wired through ethernet cables. I attempted to reboot the cable modem and TC and this did not resolve the
-
Recover Xperia ZR notes app.
A while ago, I backed up my Xperia ZR. I did a factory reset, and tried to recover the back up files; however according to the Sony PC companion, now my phone has an older version of the OS so I cannot apply the backup file. I tried to recover the no
-
Where do you find deleted Photos when they are not in the Trash?
I deleted my photos from the Album which meant deleting them completely. How can I restore them? Can't find them in the Trash