Adding SQL in a particular point of query

Hi,
i've followin query:
select substr(T11019.TTDSMT , 1 , 3) as c1,
sum(round(Cast(T41115.LG12 as double) / nullif( 1000, 0) , 2)) as c2,
sum(round(Cast(T41115.LG12B as double) / nullif( 1000, 0) , 2)) as c3,
T11019.TTCDMT as c4,
T11019.TTYEAR as c5
from
AMPLIITH.TSTERCRDWH.DMTDATEM T11019 left outer join
(select HFMCDENT,HFMCDPER,HFMYEAR,HFMCDCHAN,HFMCDKPI,HFMDSKPI,
SUM(CASE WHEN HFMCDKPI='G1.1' THEN HFMACTL ELSE null END *HFMSIGN) LG11,
SUM(CASE WHEN HFMCDKPI='G1.1' THEN HFMACTR ELSE null END *HFMSIGN) AG11,
SUM(CASE WHEN HFMCDKPI='G1.1' THEN HFMACTG ELSE null END *HFMSIGN) GG11,
SUM(CASE WHEN HFMCDKPI='G1.2' THEN HFMACTL ELSE null END *HFMSIGN) LG12,
SUM(CASE WHEN HFMCDKPI='G1.2' THEN HFMACTR ELSE null END *HFMSIGN) AG12,
SUM(CASE WHEN HFMCDKPI='G1.2' THEN HFMACTG ELSE null END *HFMSIGN) GG12,
SUM(CASE WHEN HFMCDKPI='G2.1' THEN HFMACTL ELSE null END *HFMSIGN) LG21,
SUM(CASE WHEN HFMCDKPI='G2.1' THEN HFMACTR ELSE null END *HFMSIGN) AG21,
SUM(CASE WHEN HFMCDKPI='G2.1' THEN HFMACTG ELSE null END *HFMSIGN) GG21,
SUM(CASE WHEN HFMCDKPI in ('G2.2', 'FK2.1') THEN HFMACTL ELSE null END *HFMSIGN) LG22,
SUM(CASE WHEN HFMCDKPI in ('G2.2', 'FK2.1') THEN HFMACTR ELSE null END *HFMSIGN) AG22,
SUM(CASE WHEN HFMCDKPI in ('G2.2', 'FK2.1') THEN HFMACTG ELSE null END *HFMSIGN) GG22,
SUM(CASE WHEN HFMCDKPI='G2.3' THEN HFMACTL ELSE null END *HFMSIGN) LG23,
SUM(CASE WHEN HFMCDKPI='G2.3' THEN HFMACTR ELSE null END *HFMSIGN) AG23,
SUM(CASE WHEN HFMCDKPI='G2.3' THEN HFMACTG ELSE null END *HFMSIGN) GG23,
SUM(CASE WHEN HFMCDKPI='G2.5' THEN HFMACTL ELSE null END *HFMSIGN) LG25,
SUM(CASE WHEN HFMCDKPI='G2.5' THEN HFMACTR ELSE null END *HFMSIGN) AG25,
SUM(CASE WHEN HFMCDKPI='G2.5' THEN HFMACTG ELSE null END *HFMSIGN) GG25, 
SUM(CASE WHEN HFMCDKPI='G2.6' THEN HFMACTL ELSE null END *HFMSIGN) LG26,
SUM(CASE WHEN HFMCDKPI='G2.6' THEN HFMACTR ELSE null END *HFMSIGN) AG26,
SUM(CASE WHEN HFMCDKPI='G2.6' THEN HFMACTG ELSE null END *HFMSIGN) GG26,
SUM(CASE WHEN HFMCDKPI in ('G2.7', 'FK2.1') THEN HFMACTL ELSE null END *HFMSIGN) LG27,
SUM(CASE WHEN HFMCDKPI in ('G2.7', 'FK2.1') THEN HFMACTR ELSE null END *HFMSIGN) AG27,
SUM(CASE WHEN HFMCDKPI in ('G2.7', 'FK2.1') THEN HFMACTG ELSE null END *HFMSIGN) GG27,
SUM(CASE WHEN HFMCDKPI='G2.8' THEN HFMACTL ELSE null END *HFMSIGN) LG28,
SUM(CASE WHEN HFMCDKPI='G2.8' THEN HFMACTR ELSE null END *HFMSIGN) AG28,
SUM(CASE WHEN HFMCDKPI='G2.8' THEN HFMACTG ELSE null END *HFMSIGN) GG28,
SUM(CASE WHEN HFMCDKPI='G1.1.a' THEN HFMACTL ELSE null END *HFMSIGN) LG11a,
SUM(CASE WHEN HFMCDKPI='G1.1.a' THEN HFMACTR ELSE null END *HFMSIGN) AG11a,
SUM(CASE WHEN HFMCDKPI='G1.1.a' THEN HFMACTG ELSE null END *HFMSIGN) GG11a,
SUM(CASE WHEN HFMCDKPI='G1.2.1' THEN HFMACTL ELSE null END *HFMSIGN) LG121,
SUM(CASE WHEN HFMCDKPI='G1.2.1' THEN HFMACTR ELSE null END *HFMSIGN) AG121,
SUM(CASE WHEN HFMCDKPI='G1.2.1' THEN HFMACTG ELSE null END *HFMSIGN) GG121,
SUM(CASE WHEN HFMCDKPI='G1.2.11' THEN HFMACTL ELSE null END *HFMSIGN) LG1211,
SUM(CASE WHEN HFMCDKPI='G1.2.11' THEN HFMACTR ELSE null END *HFMSIGN) AG1211,
SUM(CASE WHEN HFMCDKPI='G1.2.11' THEN HFMACTG ELSE null END *HFMSIGN) GG1211,
SUM(CASE WHEN HFMCDKPI='G1.2.12' THEN HFMACTL ELSE null END *HFMSIGN) LG1212,
SUM(CASE WHEN HFMCDKPI='G1.2.12' THEN HFMACTR ELSE null END *HFMSIGN) AG1212,
SUM(CASE WHEN HFMCDKPI='G1.2.12' THEN HFMACTG ELSE null END *HFMSIGN) GG1212,    
SUM(CASE WHEN HFMCDKPI='G1.2.13' THEN HFMACTL ELSE null END *HFMSIGN) LG1213,
SUM(CASE WHEN HFMCDKPI='G1.2.13' THEN HFMACTR ELSE null END *HFMSIGN) AG1213,
SUM(CASE WHEN HFMCDKPI='G1.2.13' THEN HFMACTG ELSE null END *HFMSIGN) GG1213,  
SUM(CASE WHEN HFMCDKPI='G1.2.14' THEN HFMACTL ELSE null END *HFMSIGN) LG1214,
SUM(CASE WHEN HFMCDKPI='G1.2.14' THEN HFMACTR ELSE null END *HFMSIGN) AG1214,
SUM(CASE WHEN HFMCDKPI='G1.2.14' THEN HFMACTG ELSE null END *HFMSIGN) GG1214,  
SUM(CASE WHEN HFMCDKPI='G1.2.15' THEN HFMACTL ELSE null END *HFMSIGN) LG1215,
SUM(CASE WHEN HFMCDKPI='G1.2.15' THEN HFMACTR ELSE null END *HFMSIGN) AG1215,
SUM(CASE WHEN HFMCDKPI='G1.2.15' THEN HFMACTG ELSE null END *HFMSIGN) GG1215,
SUM(CASE WHEN HFMCDKPI='G1.2.16' THEN HFMACTL ELSE null END *HFMSIGN) LG1216,
SUM(CASE WHEN HFMCDKPI='G1.2.16' THEN HFMACTR ELSE null END *HFMSIGN) AG1216,
SUM(CASE WHEN HFMCDKPI='G1.2.16' THEN HFMACTG ELSE null END *HFMSIGN) GG1216,
SUM(CASE WHEN HFMCDKPI='G1.2.2' THEN HFMACTL ELSE null END *HFMSIGN) LG122,
SUM(CASE WHEN HFMCDKPI='G1.2.2' THEN HFMACTR ELSE null END *HFMSIGN) AG122,
SUM(CASE WHEN HFMCDKPI='G1.2.2' THEN HFMACTG ELSE null END *HFMSIGN) GG122,
SUM(CASE WHEN HFMCDKPI='G1.2.3' THEN HFMACTL ELSE null END *HFMSIGN) LG123,
SUM(CASE WHEN HFMCDKPI='G1.2.3' THEN HFMACTR ELSE null END *HFMSIGN) AG123,
SUM(CASE WHEN HFMCDKPI='G1.2.3' THEN HFMACTG ELSE null END *HFMSIGN) GG123,
SUM(CASE WHEN HFMCDKPI='G1.2.4' THEN HFMACTL ELSE null END *HFMSIGN) LG124,
SUM(CASE WHEN HFMCDKPI='G1.2.4' THEN HFMACTR ELSE null END *HFMSIGN) AG124,
SUM(CASE WHEN HFMCDKPI='G1.2.4' THEN HFMACTG ELSE null END *HFMSIGN) GG124,
SUM(CASE WHEN HFMCDKPI='G1.2.5' THEN HFMACTL ELSE null END *HFMSIGN) LG125,
SUM(CASE WHEN HFMCDKPI='G1.2.5' THEN HFMACTR ELSE null END *HFMSIGN) AG125,
SUM(CASE WHEN HFMCDKPI='G1.2.5' THEN HFMACTG ELSE null END *HFMSIGN) GG125,
SUM(CASE WHEN HFMCDKPI='G1.2.6' THEN HFMACTL ELSE null END *HFMSIGN) LG126,
SUM(CASE WHEN HFMCDKPI='G1.2.6' THEN HFMACTR ELSE null END *HFMSIGN) AG126,
SUM(CASE WHEN HFMCDKPI='G1.2.6' THEN HFMACTG ELSE null END *HFMSIGN) GG126,
SUM(CASE WHEN HFMCDKPI='FK2.1' THEN HFMACTL ELSE null END *HFMSIGN) LFK21,
SUM(CASE WHEN HFMCDKPI='FK2.1' THEN HFMACTR ELSE null END *HFMSIGN) AFK21,
SUM(CASE WHEN HFMCDKPI='FK2.1' THEN HFMACTG ELSE null END *HFMSIGN) GFK21,
SUM(CASE WHEN HFMCDKPI='FK3.1' THEN HFMACTL ELSE null END *HFMSIGN) LFK31,
SUM(CASE WHEN HFMCDKPI='FK3.1' THEN HFMACTR ELSE null END *HFMSIGN) AFK31,
SUM(CASE WHEN HFMCDKPI='FK3.1' THEN HFMACTG ELSE null END *HFMSIGN) GFK31,
SUM(CASE WHEN HFMCDKPI='FK4.1' THEN HFMACTL ELSE null END *HFMSIGN) LFK41,
SUM(CASE WHEN HFMCDKPI='FK4.1' THEN HFMACTR ELSE null END *HFMSIGN) AFK41,
SUM(CASE WHEN HFMCDKPI='FK4.1' THEN HFMACTG ELSE null END *HFMSIGN) GFK41,
SUM(CASE WHEN HFMCDKPI='FK4.2' THEN HFMACTL ELSE null END *HFMSIGN) LFK42,
SUM(CASE WHEN HFMCDKPI='FK4.2' THEN HFMACTR ELSE null END *HFMSIGN) AFK42,
SUM(CASE WHEN HFMCDKPI='FK4.2' THEN HFMACTG ELSE null END *HFMSIGN) GFK42,
SUM(CASE WHEN HFMCDKPI='G1.1' THEN HFMBDGL ELSE null END *HFMSIGN) LG11B,
SUM(CASE WHEN HFMCDKPI='G1.1' THEN HFMBDGR ELSE null END *HFMSIGN) AG11B,
SUM(CASE WHEN HFMCDKPI='G1.1' THEN HFMBDGG ELSE null END *HFMSIGN) GG11B,
SUM(CASE WHEN HFMCDKPI='G1.2' THEN HFMBDGL ELSE null END *HFMSIGN) LG12B,
SUM(CASE WHEN HFMCDKPI='G1.2' THEN HFMBDGR ELSE null END *HFMSIGN) AG12B,
SUM(CASE WHEN HFMCDKPI='G1.2' THEN HFMBDGG ELSE null END *HFMSIGN) GG12B,
SUM(CASE WHEN HFMCDKPI='G2.1' THEN HFMBDGL ELSE null END *HFMSIGN) LG21B,
SUM(CASE WHEN HFMCDKPI='G2.1' THEN HFMBDGR ELSE null END *HFMSIGN) AG21B,
SUM(CASE WHEN HFMCDKPI='G2.1' THEN HFMBDGG ELSE null END *HFMSIGN) GG21B,
SUM(CASE WHEN HFMCDKPI in ('G2.2', 'FK2.1') THEN HFMBDGL ELSE null END *HFMSIGN) LG22B,
SUM(CASE WHEN HFMCDKPI in ('G2.2', 'FK2.1') THEN HFMBDGR ELSE null END *HFMSIGN) AG22B,
SUM(CASE WHEN HFMCDKPI in ('G2.2', 'FK2.1') THEN HFMBDGG ELSE null END *HFMSIGN) GG22B,
SUM(CASE WHEN HFMCDKPI='G2.3' THEN HFMBDGL ELSE null END *HFMSIGN) LG23B,
SUM(CASE WHEN HFMCDKPI='G2.3' THEN HFMBDGR ELSE null END *HFMSIGN) AG23B,
SUM(CASE WHEN HFMCDKPI='G2.3' THEN HFMBDGG ELSE null END *HFMSIGN) GG23B,
SUM(CASE WHEN HFMCDKPI='G2.5' THEN HFMBDGL ELSE null END *HFMSIGN) LG25B,
SUM(CASE WHEN HFMCDKPI='G2.5' THEN HFMBDGR ELSE null END *HFMSIGN) AG25B,
SUM(CASE WHEN HFMCDKPI='G2.5' THEN HFMBDGG ELSE null END *HFMSIGN) GG25B, 
SUM(CASE WHEN HFMCDKPI='G2.6' THEN HFMBDGL ELSE null END *HFMSIGN) LG26B,
SUM(CASE WHEN HFMCDKPI='G2.6' THEN HFMBDGR ELSE null END *HFMSIGN) AG26B,
SUM(CASE WHEN HFMCDKPI='G2.6' THEN HFMBDGG ELSE null END *HFMSIGN) GG26B,
SUM(CASE WHEN HFMCDKPI in ('G2.7', 'FK2.1') THEN HFMBDGL ELSE null END *HFMSIGN) LG27B,
SUM(CASE WHEN HFMCDKPI in ('G2.7', 'FK2.1') THEN HFMBDGR ELSE null END *HFMSIGN) AG27B,
SUM(CASE WHEN HFMCDKPI in ('G2.7', 'FK2.1') THEN HFMBDGG ELSE null END *HFMSIGN) GG27B,
SUM(CASE WHEN HFMCDKPI='G2.8' THEN HFMBDGL ELSE null END *HFMSIGN) LG28B,
SUM(CASE WHEN HFMCDKPI='G2.8' THEN HFMBDGR ELSE null END *HFMSIGN) AG28B,
SUM(CASE WHEN HFMCDKPI='G2.8' THEN HFMBDGG ELSE null END *HFMSIGN) GG28B,
SUM(CASE WHEN HFMCDKPI='G1.1.a' THEN HFMBDGL ELSE null END *HFMSIGN) LG11aB,
SUM(CASE WHEN HFMCDKPI='G1.1.a' THEN HFMBDGR ELSE null END *HFMSIGN) AG11aB,
SUM(CASE WHEN HFMCDKPI='G1.1.a' THEN HFMBDGG ELSE null END *HFMSIGN) GG11aB,
SUM(CASE WHEN HFMCDKPI='G1.2.1' THEN HFMBDGL ELSE null END *HFMSIGN) LG121B,
SUM(CASE WHEN HFMCDKPI='G1.2.1' THEN HFMBDGR ELSE null END *HFMSIGN) AG121B,
SUM(CASE WHEN HFMCDKPI='G1.2.1' THEN HFMBDGG ELSE null END *HFMSIGN) GG121B,
SUM(CASE WHEN HFMCDKPI='G1.2.11' THEN HFMBDGL ELSE null END *HFMSIGN) LG1211B,
SUM(CASE WHEN HFMCDKPI='G1.2.11' THEN HFMBDGR ELSE null END *HFMSIGN) AG1211B,
SUM(CASE WHEN HFMCDKPI='G1.2.11' THEN HFMBDGG ELSE null END *HFMSIGN) GG1211B,
SUM(CASE WHEN HFMCDKPI='G1.2.12' THEN HFMBDGL ELSE null END *HFMSIGN) LG1212B,
SUM(CASE WHEN HFMCDKPI='G1.2.12' THEN HFMBDGR ELSE null END *HFMSIGN) AG1212B,
SUM(CASE WHEN HFMCDKPI='G1.2.12' THEN HFMBDGG ELSE null END *HFMSIGN) GG1212B,    
SUM(CASE WHEN HFMCDKPI='G1.2.13' THEN HFMBDGL ELSE null END *HFMSIGN) LG1213B,
SUM(CASE WHEN HFMCDKPI='G1.2.13' THEN HFMBDGR ELSE null END *HFMSIGN) AG1213B,
SUM(CASE WHEN HFMCDKPI='G1.2.13' THEN HFMBDGG ELSE null END *HFMSIGN) GG1213B,  
SUM(CASE WHEN HFMCDKPI='G1.2.14' THEN HFMBDGL ELSE null END *HFMSIGN) LG1214B,
SUM(CASE WHEN HFMCDKPI='G1.2.14' THEN HFMBDGR ELSE null END *HFMSIGN) AG1214B,
SUM(CASE WHEN HFMCDKPI='G1.2.14' THEN HFMBDGG ELSE null END *HFMSIGN) GG1214B,  
SUM(CASE WHEN HFMCDKPI='G1.2.15' THEN HFMBDGL ELSE null END *HFMSIGN) LG1215B,
SUM(CASE WHEN HFMCDKPI='G1.2.15' THEN HFMBDGR ELSE null END *HFMSIGN) AG1215B,
SUM(CASE WHEN HFMCDKPI='G1.2.15' THEN HFMBDGG ELSE null END *HFMSIGN) GG1215B,
SUM(CASE WHEN HFMCDKPI='G1.2.16' THEN HFMBDGL ELSE null END *HFMSIGN) LG1216B,
SUM(CASE WHEN HFMCDKPI='G1.2.16' THEN HFMBDGR ELSE null END *HFMSIGN) AG1216B,
SUM(CASE WHEN HFMCDKPI='G1.2.16' THEN HFMBDGG ELSE null END *HFMSIGN) GG1216B,
SUM(CASE WHEN HFMCDKPI='G1.2.2' THEN HFMBDGL ELSE null END *HFMSIGN) LG122B,
SUM(CASE WHEN HFMCDKPI='G1.2.2' THEN HFMBDGR ELSE null END *HFMSIGN) AG122B,
SUM(CASE WHEN HFMCDKPI='G1.2.2' THEN HFMBDGG ELSE null END *HFMSIGN) GG122B,
SUM(CASE WHEN HFMCDKPI='G1.2.3' THEN HFMBDGL ELSE null END *HFMSIGN) LG123B,
SUM(CASE WHEN HFMCDKPI='G1.2.3' THEN HFMBDGR ELSE null END *HFMSIGN) AG123B,
SUM(CASE WHEN HFMCDKPI='G1.2.3' THEN HFMBDGG ELSE null END *HFMSIGN) GG123B,
SUM(CASE WHEN HFMCDKPI='G1.2.4' THEN HFMBDGL ELSE null END *HFMSIGN) LG124B,
SUM(CASE WHEN HFMCDKPI='G1.2.4' THEN HFMBDGR ELSE null END *HFMSIGN) AG124B,
SUM(CASE WHEN HFMCDKPI='G1.2.4' THEN HFMBDGG ELSE null END *HFMSIGN) GG124B,
SUM(CASE WHEN HFMCDKPI='G1.2.5' THEN HFMBDGL ELSE null END *HFMSIGN) LG125B,
SUM(CASE WHEN HFMCDKPI='G1.2.5' THEN HFMBDGR ELSE null END *HFMSIGN) AG125B,
SUM(CASE WHEN HFMCDKPI='G1.2.5' THEN HFMBDGG ELSE null END *HFMSIGN) GG125B,
SUM(CASE WHEN HFMCDKPI='G1.2.6' THEN HFMBDGL ELSE null END *HFMSIGN) LG126B,
SUM(CASE WHEN HFMCDKPI='G1.2.6' THEN HFMBDGR ELSE null END *HFMSIGN) AG126B,
SUM(CASE WHEN HFMCDKPI='G1.2.6' THEN HFMBDGG ELSE null END *HFMSIGN) GG126B,
SUM(CASE WHEN HFMCDKPI='FK2.1' THEN HFMBDGL ELSE null END *HFMSIGN) LFK21B,
SUM(CASE WHEN HFMCDKPI='FK2.1' THEN HFMBDGR ELSE null END *HFMSIGN) AFK21B,
SUM(CASE WHEN HFMCDKPI='FK2.1' THEN HFMBDGG ELSE null END *HFMSIGN) GFK21B,
SUM(CASE WHEN HFMCDKPI='FK3.1' THEN HFMBDGL ELSE null END *HFMSIGN) LFK31B,
SUM(CASE WHEN HFMCDKPI='FK3.1' THEN HFMBDGR ELSE null END *HFMSIGN) AFK31B,
SUM(CASE WHEN HFMCDKPI='FK3.1' THEN HFMBDGG ELSE null END *HFMSIGN) GFK31B,
SUM(CASE WHEN HFMCDKPI='FK4.1' THEN HFMBDGL ELSE null END *HFMSIGN) LFK41B,
SUM(CASE WHEN HFMCDKPI='FK4.1' THEN HFMBDGR ELSE null END *HFMSIGN) AFK41B,
SUM(CASE WHEN HFMCDKPI='FK4.1' THEN HFMBDGG ELSE null END *HFMSIGN) GFK41B,
SUM(CASE WHEN HFMCDKPI='FK4.2' THEN HFMBDGL ELSE null END *HFMSIGN) LFK42B,
SUM(CASE WHEN HFMCDKPI='FK4.2' THEN HFMBDGR ELSE null END *HFMSIGN) AFK42B,
SUM(CASE WHEN HFMCDKPI='FK4.2' THEN HFMBDGG ELSE null END *HFMSIGN) GFK42B,
'0' GFK22,
'0' GFK22B,
'0' LG11ACT,
'0' LG12ACT,
'0' LG11BGT,
'0' LG12BGT,
'0' LG11PRY,
'0' LG12PRY
FROM FHFM1
GROUP BY HFMCDENT,HFMCDPER,HFMYEAR,HFMCDCHAN,HFMCDKPI,HFMDSKPI) T41115 On T11019.TTPER = T41115.HFMCDPER) *(insert SQL Here!!!!)* left outer join
AMPLIITH.TSTERCRDWH.HFMHENT T45397 On T41115.HFMCDENT = T45397.EECDENT and T45397.EEDSENT = 'Country Luxemburg'
where ( T11019.TTYEAR = 2010 and T45397.EECDENT in (select T45397.EECDENT as c1
from
AMPLIITH.TSTERCRDWH.HFMHENT T45397
where ( T45397.EEDSENT = 'Country Luxemburg' ) ) )
group by T11019.TTCDMT, T11019.TTYEAR, substr(T11019.TTDSMT , 1 , 3)
order by c1, c4, c5
Can I add sql in the bold point, beetween group by and left outer join?
Thanks

Hi Paul,
i have to reproduce following query:
select
substr( T11019.TTDSMT , 1 , 3) as c1,
sum(round(Cast(T41115.LG12 as double) / nullif( 1000, 0) , 2)) as c2,
sum(round(Cast(T41115.LG12B as double) / nullif( 1000, 0) , 2)) as c3,
T11019.TTCDMT as c4,
T11019.TTYEAR as c5
from
TSTERCRDWH.DMTDATEM T11019,
TSTERCRDWH.HFMHENT T45397
left outer join
( select HFMCDENT,HFMCDPER,HFMYEAR,HFMCDCHAN,HFMCDKPI,HFMDSKPI,
SUM(CASE WHEN HFMCDKPI='G1.1' THEN HFMACTL ELSE null END *HFMSIGN) LG11,
SUM(CASE WHEN HFMCDKPI='G1.1' THEN HFMACTR ELSE null END *HFMSIGN) AG11,
SUM(CASE WHEN HFMCDKPI='G1.1' THEN HFMACTG ELSE null END *HFMSIGN) GG11,
SUM(CASE WHEN HFMCDKPI='G1.2' THEN HFMACTL ELSE null END *HFMSIGN) LG12,
SUM(CASE WHEN HFMCDKPI='G1.2' THEN HFMACTR ELSE null END *HFMSIGN) AG12,
SUM(CASE WHEN HFMCDKPI='G1.2' THEN HFMACTG ELSE null END *HFMSIGN) GG12,
SUM(CASE WHEN HFMCDKPI='G2.1' THEN HFMACTL ELSE null END *HFMSIGN) LG21,
SUM(CASE WHEN HFMCDKPI='G2.1' THEN HFMACTR ELSE null END *HFMSIGN) AG21,
SUM(CASE WHEN HFMCDKPI='G2.1' THEN HFMACTG ELSE null END *HFMSIGN) GG21,
SUM(CASE WHEN HFMCDKPI in ('G2.2', 'FK2.1') THEN HFMACTL ELSE null END *HFMSIGN) LG22,
SUM(CASE WHEN HFMCDKPI in ('G2.2', 'FK2.1') THEN HFMACTR ELSE null END *HFMSIGN) AG22,
SUM(CASE WHEN HFMCDKPI in ('G2.2', 'FK2.1') THEN HFMACTG ELSE null END *HFMSIGN) GG22,
SUM(CASE WHEN HFMCDKPI='G2.3' THEN HFMACTL ELSE null END *HFMSIGN) LG23,
SUM(CASE WHEN HFMCDKPI='G2.3' THEN HFMACTR ELSE null END *HFMSIGN) AG23,
SUM(CASE WHEN HFMCDKPI='G2.3' THEN HFMACTG ELSE null END *HFMSIGN) GG23,
SUM(CASE WHEN HFMCDKPI='G2.5' THEN HFMACTL ELSE null END *HFMSIGN) LG25,
SUM(CASE WHEN HFMCDKPI='G2.5' THEN HFMACTR ELSE null END *HFMSIGN) AG25,
SUM(CASE WHEN HFMCDKPI='G2.5' THEN HFMACTG ELSE null END *HFMSIGN) GG25, 
SUM(CASE WHEN HFMCDKPI='G2.6' THEN HFMACTL ELSE null END *HFMSIGN) LG26,
SUM(CASE WHEN HFMCDKPI='G2.6' THEN HFMACTR ELSE null END *HFMSIGN) AG26,
SUM(CASE WHEN HFMCDKPI='G2.6' THEN HFMACTG ELSE null END *HFMSIGN) GG26,
SUM(CASE WHEN HFMCDKPI in ('G2.7', 'FK2.1') THEN HFMACTL ELSE null END *HFMSIGN) LG27,
SUM(CASE WHEN HFMCDKPI in ('G2.7', 'FK2.1') THEN HFMACTR ELSE null END *HFMSIGN) AG27,
SUM(CASE WHEN HFMCDKPI in ('G2.7', 'FK2.1') THEN HFMACTG ELSE null END *HFMSIGN) GG27,
SUM(CASE WHEN HFMCDKPI='G2.8' THEN HFMACTL ELSE null END *HFMSIGN) LG28,
SUM(CASE WHEN HFMCDKPI='G2.8' THEN HFMACTR ELSE null END *HFMSIGN) AG28,
SUM(CASE WHEN HFMCDKPI='G2.8' THEN HFMACTG ELSE null END *HFMSIGN) GG28,
SUM(CASE WHEN HFMCDKPI='G1.1.a' THEN HFMACTL ELSE null END *HFMSIGN) LG11a,
SUM(CASE WHEN HFMCDKPI='G1.1.a' THEN HFMACTR ELSE null END *HFMSIGN) AG11a,
SUM(CASE WHEN HFMCDKPI='G1.1.a' THEN HFMACTG ELSE null END *HFMSIGN) GG11a,
SUM(CASE WHEN HFMCDKPI='G1.2.1' THEN HFMACTL ELSE null END *HFMSIGN) LG121,
SUM(CASE WHEN HFMCDKPI='G1.2.1' THEN HFMACTR ELSE null END *HFMSIGN) AG121,
SUM(CASE WHEN HFMCDKPI='G1.2.1' THEN HFMACTG ELSE null END *HFMSIGN) GG121,
SUM(CASE WHEN HFMCDKPI='G1.2.11' THEN HFMACTL ELSE null END *HFMSIGN) LG1211,
SUM(CASE WHEN HFMCDKPI='G1.2.11' THEN HFMACTR ELSE null END *HFMSIGN) AG1211,
SUM(CASE WHEN HFMCDKPI='G1.2.11' THEN HFMACTG ELSE null END *HFMSIGN) GG1211,
SUM(CASE WHEN HFMCDKPI='G1.2.12' THEN HFMACTL ELSE null END *HFMSIGN) LG1212,
SUM(CASE WHEN HFMCDKPI='G1.2.12' THEN HFMACTR ELSE null END *HFMSIGN) AG1212,
SUM(CASE WHEN HFMCDKPI='G1.2.12' THEN HFMACTG ELSE null END *HFMSIGN) GG1212,    
SUM(CASE WHEN HFMCDKPI='G1.2.13' THEN HFMACTL ELSE null END *HFMSIGN) LG1213,
SUM(CASE WHEN HFMCDKPI='G1.2.13' THEN HFMACTR ELSE null END *HFMSIGN) AG1213,
SUM(CASE WHEN HFMCDKPI='G1.2.13' THEN HFMACTG ELSE null END *HFMSIGN) GG1213,  
SUM(CASE WHEN HFMCDKPI='G1.2.14' THEN HFMACTL ELSE null END *HFMSIGN) LG1214,
SUM(CASE WHEN HFMCDKPI='G1.2.14' THEN HFMACTR ELSE null END *HFMSIGN) AG1214,
SUM(CASE WHEN HFMCDKPI='G1.2.14' THEN HFMACTG ELSE null END *HFMSIGN) GG1214,  
SUM(CASE WHEN HFMCDKPI='G1.2.15' THEN HFMACTL ELSE null END *HFMSIGN) LG1215,
SUM(CASE WHEN HFMCDKPI='G1.2.15' THEN HFMACTR ELSE null END *HFMSIGN) AG1215,
SUM(CASE WHEN HFMCDKPI='G1.2.15' THEN HFMACTG ELSE null END *HFMSIGN) GG1215,
SUM(CASE WHEN HFMCDKPI='G1.2.16' THEN HFMACTL ELSE null END *HFMSIGN) LG1216,
SUM(CASE WHEN HFMCDKPI='G1.2.16' THEN HFMACTR ELSE null END *HFMSIGN) AG1216,
SUM(CASE WHEN HFMCDKPI='G1.2.16' THEN HFMACTG ELSE null END *HFMSIGN) GG1216,
SUM(CASE WHEN HFMCDKPI='G1.2.2' THEN HFMACTL ELSE null END *HFMSIGN) LG122,
SUM(CASE WHEN HFMCDKPI='G1.2.2' THEN HFMACTR ELSE null END *HFMSIGN) AG122,
SUM(CASE WHEN HFMCDKPI='G1.2.2' THEN HFMACTG ELSE null END *HFMSIGN) GG122,
SUM(CASE WHEN HFMCDKPI='G1.2.3' THEN HFMACTL ELSE null END *HFMSIGN) LG123,
SUM(CASE WHEN HFMCDKPI='G1.2.3' THEN HFMACTR ELSE null END *HFMSIGN) AG123,
SUM(CASE WHEN HFMCDKPI='G1.2.3' THEN HFMACTG ELSE null END *HFMSIGN) GG123,
SUM(CASE WHEN HFMCDKPI='G1.2.4' THEN HFMACTL ELSE null END *HFMSIGN) LG124,
SUM(CASE WHEN HFMCDKPI='G1.2.4' THEN HFMACTR ELSE null END *HFMSIGN) AG124,
SUM(CASE WHEN HFMCDKPI='G1.2.4' THEN HFMACTG ELSE null END *HFMSIGN) GG124,
SUM(CASE WHEN HFMCDKPI='G1.2.5' THEN HFMACTL ELSE null END *HFMSIGN) LG125,
SUM(CASE WHEN HFMCDKPI='G1.2.5' THEN HFMACTR ELSE null END *HFMSIGN) AG125,
SUM(CASE WHEN HFMCDKPI='G1.2.5' THEN HFMACTG ELSE null END *HFMSIGN) GG125,
SUM(CASE WHEN HFMCDKPI='G1.2.6' THEN HFMACTL ELSE null END *HFMSIGN) LG126,
SUM(CASE WHEN HFMCDKPI='G1.2.6' THEN HFMACTR ELSE null END *HFMSIGN) AG126,
SUM(CASE WHEN HFMCDKPI='G1.2.6' THEN HFMACTG ELSE null END *HFMSIGN) GG126,
SUM(CASE WHEN HFMCDKPI='FK2.1' THEN HFMACTL ELSE null END *HFMSIGN) LFK21,
SUM(CASE WHEN HFMCDKPI='FK2.1' THEN HFMACTR ELSE null END *HFMSIGN) AFK21,
SUM(CASE WHEN HFMCDKPI='FK2.1' THEN HFMACTG ELSE null END *HFMSIGN) GFK21,
SUM(CASE WHEN HFMCDKPI='FK3.1' THEN HFMACTL ELSE null END *HFMSIGN) LFK31,
SUM(CASE WHEN HFMCDKPI='FK3.1' THEN HFMACTR ELSE null END *HFMSIGN) AFK31,
SUM(CASE WHEN HFMCDKPI='FK3.1' THEN HFMACTG ELSE null END *HFMSIGN) GFK31,
SUM(CASE WHEN HFMCDKPI='FK4.1' THEN HFMACTL ELSE null END *HFMSIGN) LFK41,
SUM(CASE WHEN HFMCDKPI='FK4.1' THEN HFMACTR ELSE null END *HFMSIGN) AFK41,
SUM(CASE WHEN HFMCDKPI='FK4.1' THEN HFMACTG ELSE null END *HFMSIGN) GFK41,
SUM(CASE WHEN HFMCDKPI='FK4.2' THEN HFMACTL ELSE null END *HFMSIGN) LFK42,
SUM(CASE WHEN HFMCDKPI='FK4.2' THEN HFMACTR ELSE null END *HFMSIGN) AFK42,
SUM(CASE WHEN HFMCDKPI='FK4.2' THEN HFMACTG ELSE null END *HFMSIGN) GFK42,
SUM(CASE WHEN HFMCDKPI='G1.1' THEN HFMBDGL ELSE null END *HFMSIGN) LG11B,
SUM(CASE WHEN HFMCDKPI='G1.1' THEN HFMBDGR ELSE null END *HFMSIGN) AG11B,
SUM(CASE WHEN HFMCDKPI='G1.1' THEN HFMBDGG ELSE null END *HFMSIGN) GG11B,
SUM(CASE WHEN HFMCDKPI='G1.2' THEN HFMBDGL ELSE null END *HFMSIGN) LG12B,
SUM(CASE WHEN HFMCDKPI='G1.2' THEN HFMBDGR ELSE null END *HFMSIGN) AG12B,
SUM(CASE WHEN HFMCDKPI='G1.2' THEN HFMBDGG ELSE null END *HFMSIGN) GG12B,
SUM(CASE WHEN HFMCDKPI='G2.1' THEN HFMBDGL ELSE null END *HFMSIGN) LG21B,
SUM(CASE WHEN HFMCDKPI='G2.1' THEN HFMBDGR ELSE null END *HFMSIGN) AG21B,
SUM(CASE WHEN HFMCDKPI='G2.1' THEN HFMBDGG ELSE null END *HFMSIGN) GG21B,
SUM(CASE WHEN HFMCDKPI in ('G2.2', 'FK2.1') THEN HFMBDGL ELSE null END *HFMSIGN) LG22B,
SUM(CASE WHEN HFMCDKPI in ('G2.2', 'FK2.1') THEN HFMBDGR ELSE null END *HFMSIGN) AG22B,
SUM(CASE WHEN HFMCDKPI in ('G2.2', 'FK2.1') THEN HFMBDGG ELSE null END *HFMSIGN) GG22B,
SUM(CASE WHEN HFMCDKPI='G2.3' THEN HFMBDGL ELSE null END *HFMSIGN) LG23B,
SUM(CASE WHEN HFMCDKPI='G2.3' THEN HFMBDGR ELSE null END *HFMSIGN) AG23B,
SUM(CASE WHEN HFMCDKPI='G2.3' THEN HFMBDGG ELSE null END *HFMSIGN) GG23B,
SUM(CASE WHEN HFMCDKPI='G2.5' THEN HFMBDGL ELSE null END *HFMSIGN) LG25B,
SUM(CASE WHEN HFMCDKPI='G2.5' THEN HFMBDGR ELSE null END *HFMSIGN) AG25B,
SUM(CASE WHEN HFMCDKPI='G2.5' THEN HFMBDGG ELSE null END *HFMSIGN) GG25B, 
SUM(CASE WHEN HFMCDKPI='G2.6' THEN HFMBDGL ELSE null END *HFMSIGN) LG26B,
SUM(CASE WHEN HFMCDKPI='G2.6' THEN HFMBDGR ELSE null END *HFMSIGN) AG26B,
SUM(CASE WHEN HFMCDKPI='G2.6' THEN HFMBDGG ELSE null END *HFMSIGN) GG26B,
SUM(CASE WHEN HFMCDKPI in ('G2.7', 'FK2.1') THEN HFMBDGL ELSE null END *HFMSIGN) LG27B,
SUM(CASE WHEN HFMCDKPI in ('G2.7', 'FK2.1') THEN HFMBDGR ELSE null END *HFMSIGN) AG27B,
SUM(CASE WHEN HFMCDKPI in ('G2.7', 'FK2.1') THEN HFMBDGG ELSE null END *HFMSIGN) GG27B,
SUM(CASE WHEN HFMCDKPI='G2.8' THEN HFMBDGL ELSE null END *HFMSIGN) LG28B,
SUM(CASE WHEN HFMCDKPI='G2.8' THEN HFMBDGR ELSE null END *HFMSIGN) AG28B,
SUM(CASE WHEN HFMCDKPI='G2.8' THEN HFMBDGG ELSE null END *HFMSIGN) GG28B,
SUM(CASE WHEN HFMCDKPI='G1.1.a' THEN HFMBDGL ELSE null END *HFMSIGN) LG11aB,
SUM(CASE WHEN HFMCDKPI='G1.1.a' THEN HFMBDGR ELSE null END *HFMSIGN) AG11aB,
SUM(CASE WHEN HFMCDKPI='G1.1.a' THEN HFMBDGG ELSE null END *HFMSIGN) GG11aB,
SUM(CASE WHEN HFMCDKPI='G1.2.1' THEN HFMBDGL ELSE null END *HFMSIGN) LG121B,
SUM(CASE WHEN HFMCDKPI='G1.2.1' THEN HFMBDGR ELSE null END *HFMSIGN) AG121B,
SUM(CASE WHEN HFMCDKPI='G1.2.1' THEN HFMBDGG ELSE null END *HFMSIGN) GG121B,
SUM(CASE WHEN HFMCDKPI='G1.2.11' THEN HFMBDGL ELSE null END *HFMSIGN) LG1211B,
SUM(CASE WHEN HFMCDKPI='G1.2.11' THEN HFMBDGR ELSE null END *HFMSIGN) AG1211B,
SUM(CASE WHEN HFMCDKPI='G1.2.11' THEN HFMBDGG ELSE null END *HFMSIGN) GG1211B,
SUM(CASE WHEN HFMCDKPI='G1.2.12' THEN HFMBDGL ELSE null END *HFMSIGN) LG1212B,
SUM(CASE WHEN HFMCDKPI='G1.2.12' THEN HFMBDGR ELSE null END *HFMSIGN) AG1212B,
SUM(CASE WHEN HFMCDKPI='G1.2.12' THEN HFMBDGG ELSE null END *HFMSIGN) GG1212B,    
SUM(CASE WHEN HFMCDKPI='G1.2.13' THEN HFMBDGL ELSE null END *HFMSIGN) LG1213B,
SUM(CASE WHEN HFMCDKPI='G1.2.13' THEN HFMBDGR ELSE null END *HFMSIGN) AG1213B,
SUM(CASE WHEN HFMCDKPI='G1.2.13' THEN HFMBDGG ELSE null END *HFMSIGN) GG1213B,  
SUM(CASE WHEN HFMCDKPI='G1.2.14' THEN HFMBDGL ELSE null END *HFMSIGN) LG1214B,
SUM(CASE WHEN HFMCDKPI='G1.2.14' THEN HFMBDGR ELSE null END *HFMSIGN) AG1214B,
SUM(CASE WHEN HFMCDKPI='G1.2.14' THEN HFMBDGG ELSE null END *HFMSIGN) GG1214B,  
SUM(CASE WHEN HFMCDKPI='G1.2.15' THEN HFMBDGL ELSE null END *HFMSIGN) LG1215B,
SUM(CASE WHEN HFMCDKPI='G1.2.15' THEN HFMBDGR ELSE null END *HFMSIGN) AG1215B,
SUM(CASE WHEN HFMCDKPI='G1.2.15' THEN HFMBDGG ELSE null END *HFMSIGN) GG1215B,
SUM(CASE WHEN HFMCDKPI='G1.2.16' THEN HFMBDGL ELSE null END *HFMSIGN) LG1216B,
SUM(CASE WHEN HFMCDKPI='G1.2.16' THEN HFMBDGR ELSE null END *HFMSIGN) AG1216B,
SUM(CASE WHEN HFMCDKPI='G1.2.16' THEN HFMBDGG ELSE null END *HFMSIGN) GG1216B,
SUM(CASE WHEN HFMCDKPI='G1.2.2' THEN HFMBDGL ELSE null END *HFMSIGN) LG122B,
SUM(CASE WHEN HFMCDKPI='G1.2.2' THEN HFMBDGR ELSE null END *HFMSIGN) AG122B,
SUM(CASE WHEN HFMCDKPI='G1.2.2' THEN HFMBDGG ELSE null END *HFMSIGN) GG122B,
SUM(CASE WHEN HFMCDKPI='G1.2.3' THEN HFMBDGL ELSE null END *HFMSIGN) LG123B,
SUM(CASE WHEN HFMCDKPI='G1.2.3' THEN HFMBDGR ELSE null END *HFMSIGN) AG123B,
SUM(CASE WHEN HFMCDKPI='G1.2.3' THEN HFMBDGG ELSE null END *HFMSIGN) GG123B,
SUM(CASE WHEN HFMCDKPI='G1.2.4' THEN HFMBDGL ELSE null END *HFMSIGN) LG124B,
SUM(CASE WHEN HFMCDKPI='G1.2.4' THEN HFMBDGR ELSE null END *HFMSIGN) AG124B,
SUM(CASE WHEN HFMCDKPI='G1.2.4' THEN HFMBDGG ELSE null END *HFMSIGN) GG124B,
SUM(CASE WHEN HFMCDKPI='G1.2.5' THEN HFMBDGL ELSE null END *HFMSIGN) LG125B,
SUM(CASE WHEN HFMCDKPI='G1.2.5' THEN HFMBDGR ELSE null END *HFMSIGN) AG125B,
SUM(CASE WHEN HFMCDKPI='G1.2.5' THEN HFMBDGG ELSE null END *HFMSIGN) GG125B,
SUM(CASE WHEN HFMCDKPI='G1.2.6' THEN HFMBDGL ELSE null END *HFMSIGN) LG126B,
SUM(CASE WHEN HFMCDKPI='G1.2.6' THEN HFMBDGR ELSE null END *HFMSIGN) AG126B,
SUM(CASE WHEN HFMCDKPI='G1.2.6' THEN HFMBDGG ELSE null END *HFMSIGN) GG126B,
SUM(CASE WHEN HFMCDKPI='FK2.1' THEN HFMBDGL ELSE null END *HFMSIGN) LFK21B,
SUM(CASE WHEN HFMCDKPI='FK2.1' THEN HFMBDGR ELSE null END *HFMSIGN) AFK21B,
SUM(CASE WHEN HFMCDKPI='FK2.1' THEN HFMBDGG ELSE null END *HFMSIGN) GFK21B,
SUM(CASE WHEN HFMCDKPI='FK3.1' THEN HFMBDGL ELSE null END *HFMSIGN) LFK31B,
SUM(CASE WHEN HFMCDKPI='FK3.1' THEN HFMBDGR ELSE null END *HFMSIGN) AFK31B,
SUM(CASE WHEN HFMCDKPI='FK3.1' THEN HFMBDGG ELSE null END *HFMSIGN) GFK31B,
SUM(CASE WHEN HFMCDKPI='FK4.1' THEN HFMBDGL ELSE null END *HFMSIGN) LFK41B,
SUM(CASE WHEN HFMCDKPI='FK4.1' THEN HFMBDGR ELSE null END *HFMSIGN) AFK41B,
SUM(CASE WHEN HFMCDKPI='FK4.1' THEN HFMBDGG ELSE null END *HFMSIGN) GFK41B,
SUM(CASE WHEN HFMCDKPI='FK4.2' THEN HFMBDGL ELSE null END *HFMSIGN) LFK42B,
SUM(CASE WHEN HFMCDKPI='FK4.2' THEN HFMBDGR ELSE null END *HFMSIGN) AFK42B,
SUM(CASE WHEN HFMCDKPI='FK4.2' THEN HFMBDGG ELSE null END *HFMSIGN) GFK42B,
'0' GFK22,
'0' GFK22B,
'0' LG11ACT,
'0' LG12ACT,
'0' LG11BGT,
'0' LG12BGT,
'0' LG11PRY,
'0' LG12PRY
FROM tstercrdwh.FHFM1
GROUP BY HFMCDENT,HFMCDPER,HFMYEAR,HFMCDCHAN,HFMCDKPI,HFMDSKPI
) T41115 On T45397.EECDENT= T41115.HFMCDENT and T11019.TTPER = T41115.HFMCDPER
where ( T11019.TTYEAR = 2010 ) and T45397.EEDSENT = 'Country Luxemburg'
group by T11019.TTCDMT, T11019.TTYEAR, substr( T11019.TTDSMT , 1 , 3)
order by c1, c4, c5
where you can see i have 3 tables DMTDATEM, HFMHENT and a view T4115 (it's a view based on my fact table). As you can see, DMTDATEM and HFMHENT tables are in cross join, indeed HFMHENT is in left outer join with my view.
So in Administration tool, i have 3 objects: DMTDATEM, HFMHENT and T4115 view.
To simulate a cross join beetween DMTDATEM and HFMHENT, in Physical Diagram i've joined tables with a complex join and in clause i've setted condition 1=1. In Business Diagram the tables aren't joined
To simulate a left outer join beetween HFMHENT and T4115 view, similar i've worked on Business Diagram.
Now Administration Tool check consistency doesn't give errors, but when i start Oracle BI Server service it crashes and if i go on my dashboard, all my reports give an absurd error:
NQSERROR : BI Server is not running. Impossible to connect on port 9703.
If i see log i don't see particular errors due to my rpd.
What's the problem?
Giancarlo

Similar Messages

  • How to find out responsibility attached for particular user through query

    hi
    How to find out responsibility attached for particular user through query
    Regards
    9841672839

    Hi,
    Following sql will help you find the responsibilities associated with the users in oracle applications.
    SELECT frt.RESPONSIBILITY_NAME, furg.end_date
    FROM
    fnd_user_resp_groups furg,
    FND_RESPONSIBILITY fr,
    fnd_responsibility_tl frt,
    fnd_user fu
    WHERE fu.user_name = ‘&&username’
    AND fu.user_id = furg.user_id
    AND furg.responsibility_id = fr.RESPONSIBILITY_ID
    AND frt.responsibility_id = fr.RESPONSIBILITY_ID
    ORDER BY 1
    Cheers...

  • Collect message till particular point of Time in BPM

    Hi,
    I want to collect messages till particular point in time like till 6 oclock evening.
    In deadline branch i have to use Expression and should give date and time.
    What is the format of date and time if it is not coming in payload.
    What is the difference between: Creating the step and Creating the process property.
    Any help is apreciated.
    Thanks and regards,
    Satish

    The date and time format will be the standard XSD date and time format
    Date:
    YYYY-MM-DD  or YYYY-MM-DDZ
    Time:
    HH:MM:SS or HH:MM:SS.x
    But since your requirement is to collect the messages till 6pm everyday, I guess there is a problem with the mandatory date field.
    Maybe you can use a datatype which holds the current time in a field and use the field as the loop variable.
    - Kannan

  • How can i put one small image on another big image at particular point

    Hi,
    I have combined two images but new mask image is totally overwrite and come in whitecolored not in original color.....
    I have user CGImageMaskCreate, CGImageCreateWithMask......
    But i want to put small image on big image at particular point...... that i m tired to search but i can't find.......
    Any thing is remaining then pls tell me...
    Thanks,
    Haresh.

    Check the Quartz2D documents on Apple's site. Do a search in your examples folder in the developer folder and on Apple's site for Masks. I haven't used them under this API but that's probably the best place to start.

  • After upgrade from SQL Server to SQL server 2012 I cannot show Query Designer ?? Please help

    Hi
    I have installed the required .Net software, but never the less I've got this message. Could you please help me out ?
    Thanx in advance
    Pia 
    TITLE: Microsoft SQL Server Management Studio
    Cannot show Query Designer.
    ADDITIONAL INFORMATION:
    Exception has been thrown by the target of an invocation. (mscorlib)
    Unable to find the requested .Net Framework Data Provider.  It may not be installed. (System.Data)
    BUTTONS:
    OK

    also check
    http://connect.microsoft.com/VisualStudio/feedback/details/652192/visual-studio-2010-add-connection-fails
    mostly machine.config is referring to .net 3.0 assemblies
    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    | Facebook
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

  • How can i store latitude and longitude (of registered user locations) in sql server and how can i query it for finding locations inside X radius from point y (or any user)?

    Hello
    In my app (WP 8.1) i have to store user location (lat,lon) in sql db so how can i store that location detail? And i also have to find all the location which are inside certain radius X from another user location, How can i do this?
    Any Sample project or code or any blog post?
    P.S. I use sql server 2012.

    If you need to do spatial queries like the one you mentioned you'd need to store it as a spatial geography type. For points, a simple SQL INSERT statement using the Point() method would do it. Example here:
    http://msdn.microsoft.com/en-us/library/bb933811.aspx For locations inside a radius, you'd use STDistance() method. All of the methods for the geography data type are documented here:
    http://msdn.microsoft.com/en-us/library/bb933802.aspx and can be used in ordinary T-SQL statements.
    If you need to use the SQL Server spatial library in your .NET application direct, Alastair has some nice blog posts, like this one:
    https://alastaira.wordpress.com/2011/08/19/spatial-applications-in-windows-azure-redux-including-denali/ , he even wrote a book. Or search the answers in this forum.
    Hope this helps, Bob

  • Dashboard Prompt - Getting error for Adding SQL query in "Default to"

    Hello Oracle,
    I am facing some problem in Dashboard Prompt. Like when i add some sql query in "Default to" in Dashboard prompt and for the next prompt when i check for Contrain option i get error in the second prompt. but it works fine when i hard-code a value in "Default to" options.
    For Example:
    Like when we consider a two prompts :
    1) Year -> (In Default to i select SQL Query and enter the query as SELECT "YTD Dim"."Fiscal Year" FROM "YTD Report" WHERE "YTD Dim"."Fiscal Year" = Year(Current_Date)
    2) Business Unit -> (In specific value i give as some hard code value of Business Unit and check the contrain option)
    i get error as
    Business Unit
    Error Generating Drop Down Values
    A numeric value was expected (received "SELECT "YTD Dim"."Fiscal Year" FROM "YTD Report" WHERE "YTD Dim"."Fiscal Year" = Year(Current_Date)"). Error Details
    Error Codes: EHWH2A7E
    but i get correct value for Year as 2011.
    I need to use SQL query in default to option and need to check the constrain option too.
    Looking for positive feedback.

    You need to create a dashboard prompt and in Default To -> select SQL Results
    Click on the ... (three dots ) underneath it and put in your sql
    For Example , I have a Table called "Sales Date" in my "ABC" presentation folder. This has a column called "Year" and "Date". If I want to have a Year prompt with the default value set to current year, here is what the syntax of my sql result will be :-
    SELECT "ABC"."Sales Date".YEAR
    FROM "ABC"
    WHERE "Date" = current_date
    In SQL, we cannot put SQL as we know of in terms of Oracle, Sql Server etc. The SQL here refers to sql as OBIEE understands it and should be in the form of Select "Presentation foler"."Table Name".ColumnName from "Presentation Folder"
    Hope this helps

  • Using a SQL for Oracle in Microsoft Excel Query

    I am having the most difficult time (in fact, I can't get it to work) trying to use an SQL I created in Toad for Oracle. It works fine in Toad for Oracle...gives me all the data I need. I am trying to use it in Excel for users that don't know SQL or Oracle so they can use the query to extract data they need for Charts, Graphs, etc.
    Here is the SQL code from Toad for Oracle:
    /* Formatted on 2006/09/22 11:42 (Formatter Plus v4.8.6) */
    SELECT a_compl_summary.incident_number, a_compl_summary.case_number,
           a_compl_summary.part_sequence, a_compl_summary.part_number,
           a_compl_summary.lot_number, a_compl_summary.alert_date,
           a_compl_summary.entry_date, a_compl_summary.NAME,
           a_compl_summary.MONTH, a_compl_summary.product_family,
           a_compl_summary.complaint, a_compl_summary.reportable,
           a_compl_summary.product_returned, a_compl_summary.case_desc,
           a_compl_summary.failure_invest_desc, a_compl_summary.lhr_search,
           a_compl_summary.root_cause, a_compl_summary.corrective_action,
           a_compl_summary.region,
           rp_qa_reported_device_codes.reported_device_code,
           rp_qa_reported_device_codes.reported_dev_clarification,
           rp_qa_reported_device_codes.reported_dev_code_desc,
           rp_qa_patient_codes.patient_code,
           rp_qa_patient_codes.patient_code_clarif,
           rp_qa_patient_codes.patient_code_severity,
           rp_qa_patient_codes.description
      FROM chsuser.a_compl_summary,
           chsuser.rp_qa_patient_codes,
           chsuser.rp_qa_reported_device_codes
    WHERE (    (a_compl_summary.product_division = 'CP')
            AND (    a_compl_summary.entry_date >= :date1
                 AND a_compl_summary.entry_date <= :date2
            AND (   a_compl_summary.product_family LIKE :pf1
                 OR a_compl_summary.product_family LIKE :pf2
                 OR a_compl_summary.product_family LIKE :pf3
                 OR a_compl_summary.product_family LIKE :pf4
                 OR a_compl_summary.product_family LIKE :pf5
            AND (a_compl_summary.region = :r1)
            AND (   a_compl_summary.NAME = :c1
                 OR a_compl_summary.NAME = :c2
                 OR a_compl_summary.NAME = :c3
                 OR a_compl_summary.NAME = :c4
                 OR a_compl_summary.NAME = :c5
            AND (a_compl_summary.complaint = :yorn)
            AND (   rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl1
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl2
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl3
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl4
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                                                                              :cl5
            AND (rp_qa_reported_device_codes.reported_dev_clarification NOT LIKE
                                                                              :dc1
            AND (a_compl_summary.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (a_compl_summary.case_number = rp_qa_patient_codes.case_number)
            AND (a_compl_summary.part_sequence = rp_qa_patient_codes.part_sequence
            AND (a_compl_summary.incident_number =
                                       rp_qa_reported_device_codes.incident_number
            AND (a_compl_summary.case_number =
                                           rp_qa_reported_device_codes.case_number
            AND (a_compl_summary.part_sequence =
                                         rp_qa_reported_device_codes.part_sequence
            AND (rp_qa_reported_device_codes.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (rp_qa_reported_device_codes.case_number =
                                                   rp_qa_patient_codes.case_number
            AND (rp_qa_reported_device_codes.part_sequence =
                                                 rp_qa_patient_codes.part_sequence
           )Can someone help me...maybe point out what I'm doing wrong.
    Note: I also tried creating this query in Microsoft Query (the simple way) and when I first create it...it works...But then if I go back in to edit the query, and refresh the query or try to Return data to Excel, it gives me a ORA-00936 error message.
    Why it works when I first create the query in Excel, I don't know. But I have to validate the queries I'm creating (SQL or not) and I can't validate it if every time I go into edit the query (which may have to happen; that's why I have to fix this before I can submit my validation).
    Anyway, any help would be greatly appreciated.

    Okay, I know I'm replying to my own threads here...but I want to add a little bit more information again.
    I was successful in figuring out that changing the :criteria to a ? worked.
    I tested this on 1 criteria at a time. Adding one more scenario ? at at time.
    It only worked up until about 3 scenarios of each criteria.
    Then when I refreshed the query in Microsoft Excel Query, I got an "out of memory" error, and then it ended up just erasing the SQL I had been using.
    Here's the SQL I had where it gave me this error. Am I possibly just making Excel work too hard? It just doesn't make sense because Toad for Oracle handled it in like 4 seconds. Which brings me back to an intial question I had. Can Excel use Toad for Oracle somehow?
    Here's the code:
    SELECT a_compl_summary.incident_number, a_compl_summary.case_number,
           a_compl_summary.part_sequence, a_compl_summary.part_number,
           a_compl_summary.lot_number, a_compl_summary.alert_date,
           a_compl_summary.entry_date, a_compl_summary.NAME,
           a_compl_summary.MONTH, a_compl_summary.product_family,
           a_compl_summary.complaint, a_compl_summary.reportable,
           a_compl_summary.product_returned, a_compl_summary.case_desc,
           a_compl_summary.failure_invest_desc, a_compl_summary.lhr_search,
           a_compl_summary.root_cause, a_compl_summary.corrective_action,
           a_compl_summary.region,
           rp_qa_reported_device_codes.reported_device_code,
           rp_qa_reported_device_codes.reported_dev_clarification,
           rp_qa_reported_device_codes.reported_dev_code_desc,
           rp_qa_patient_codes.patient_code,
           rp_qa_patient_codes.patient_code_clarif,
           rp_qa_patient_codes.patient_code_severity,
           rp_qa_patient_codes.description
      FROM chsuser.a_compl_summary,
           chsuser.rp_qa_patient_codes,
           chsuser.rp_qa_reported_device_codes
    WHERE (    (a_compl_summary.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (a_compl_summary.case_number = rp_qa_patient_codes.case_number)
            AND (a_compl_summary.part_sequence = rp_qa_patient_codes.part_sequence
            AND (a_compl_summary.incident_number =
                                       rp_qa_reported_device_codes.incident_number
            AND (a_compl_summary.case_number =
                                           rp_qa_reported_device_codes.case_number
            AND (a_compl_summary.part_sequence =
                                         rp_qa_reported_device_codes.part_sequence
            AND (rp_qa_reported_device_codes.incident_number =
                                               rp_qa_patient_codes.incident_number
            AND (rp_qa_reported_device_codes.case_number =
                                                   rp_qa_patient_codes.case_number
            AND (rp_qa_reported_device_codes.part_sequence =
                                                 rp_qa_patient_codes.part_sequence
    AND (a_compl_summary.product_division = 'CP')
            AND (    a_compl_summary.entry_date >= ?
                 AND a_compl_summary.entry_date <= ?
            AND (   a_compl_summary.product_family LIKE ?
                 OR a_compl_summary.product_family LIKE ?
                 OR a_compl_summary.product_family LIKE ?
                 OR a_compl_summary.product_family LIKE ?
                 OR a_compl_summary.product_family LIKE ?
            AND (a_compl_summary.region = ?)
            AND (   a_compl_summary.NAME = ?
                 OR a_compl_summary.NAME = ?
                 OR a_compl_summary.NAME = ?
                 OR a_compl_summary.NAME = ?
                 OR a_compl_summary.NAME = ?
            AND (a_compl_summary.complaint = ?)
            AND (   rp_qa_reported_device_codes.reported_dev_clarification LIKE
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
                 OR rp_qa_reported_device_codes.reported_dev_clarification LIKE
            AND (rp_qa_reported_device_codes.reported_dev_clarification NOT LIKE
               ))

  • Unable to protect SQL Server after adding SQL Aliases

    DPM 2012 R2 had been successfully backing up a Server 2012 R2 virtual machine running SQL Server 2012 SP2 with 3 databases. It had been working properly for several months, the Virtual Machine is running on a Hyper-V Cluster.
    Approximately a week ago we configured aliases for the various SQL databases to provide better resiliency in case of server failure.  IE, instead of connecting to SQL as ServerName\DatabaseA, you could connect to just DatabaseADNS.  Doing so we
    had to add extra IP addresses to the server's adapter.  Initially all the addresses were registering in DNS and Named Pipes was disabled in SQL Configuration Manager for the Databases so it led to some connection difficulties when trying to connect to
    the named instances (ServerName\DatabaseA).  We resolved this so that while the server's adapter has multiple IP address there is only one DNS entry for the ServerName and one entry for each Database in DNS.  Named pipes is enabled so SQL Manager
    can connect properly.
    Since Aliases were applied however DPM began failing on 2 of the 3 Databases.  It was unable to create recovery points.
    The connection to the DPM agent on the SQL Server is OK, but if you try to modify a protection group and browse to the SQL Server when you expand it it just displays an hourglass and will not error out or display ANY sources to backup.  Even after several
    hours.
    We stopped protection of all items on the SQL Server, uninstalled the DPM agent, restarted, re-installed the DPM agent, restarted.  Restarted DPM Server, and are still unable to protect ANY items of the SQL Server. 
    There are no errors in the event logs on either server I could find.  And I've watched the DPMRA service start on the SQL Server when the DPM Server attempts to query it, so there is some communication.  Any help would be appreciated as I am at
    a loss.

    After much testing and troubleshooting a solution was found.  Our configuration is apparently a perfect storm of settings that cause DPM issues.  Our SQL Server has multiple NICs (if one is disabled it begins working) Our SQL Server's multiple
    instance are all using the default port 1433 (if ports are set differently it works), and we are using TCP aliases for more than one instance (if only one, it works)
    Each instance in SQL Config manager is assigned a unique IP address, so our production NIC has multiple IPs, set this nic to NOT register in DNS.  Manually create a Static DNS entry for the server and each alias IP address.
    In SQL Config manager set a Named Pipe alias for each instance.  Be sure to do both 32 and 64 bit aliasing.
    On the SQL Server run cliconfg.exe and enable both TCP/IP and Named Pipe protocols.
    And DPM can now enumerate and backup the server again.

  • How to make sql to use index/make to query to perform better

    Hi,
    I have 2 sql query which results the same.
    But both has difference in SQL trace.
    create table test_table
    (u_id number(10),
    u_no number(4),
    s_id number(10),
    s_no number(4),
    o_id number(10),
    o_no number(4),
    constraint pk_test primary key(u_id, u_no));
    insert into test_table(u_id, u_no, s_id, s_no, o_id, o_no)
    values (2007030301, 1, 1001, 1, 2001, 1);
    insert into test_table(u_id, u_no, s_id, s_no, o_id, o_no)
    values (2007030302, 1, 1001, 1, 2001, 2);
    insert into test_table(u_id, u_no, s_id, s_no, o_id, o_no)
    values (2007030303, 1, 1001, 1, 2001, 3);
    insert into test_table(u_id, u_no, s_id, s_no, o_id, o_no)
    values (2007030304, 1, 1001, 1, 2001, 4);
    insert into test_table(u_id, u_no, s_id, s_no, o_id, o_no)
    values (2007030305, 1, 1002, 1, 1001, 2);
    insert into test_table(u_id, u_no, s_id, s_no, o_id, o_no)
    values (2007030306, 1, 1002, 1, 1002, 1);
    commit;
    CREATE INDEX idx_test_s_id ON test_table(s_id, s_no);
    set autotrace on
    select s_id, s_no, o_id, o_no
    from test_table
    where s_id <> o_id
    and s_no <> o_no
    union all
    select o_id, o_no, s_id, s_no
    from test_table
    where s_id <> o_id
    and s_no <> o_no;
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=6 Card=8 Bytes=416)
    1 0 UNION-ALL
    2 1 TABLE ACCESS (FULL) OF 'TEST_TABLE' (TABLE) (Cost=3 Card=4 Bytes=208)
    3 1 TABLE ACCESS (FULL) OF 'TEST_TABLE' (TABLE) (Cost=3 Card=4 Bytes=208)
    Statistics
    223 recursive calls
    2 db block gets
    84 consistent gets
    0 physical reads
    0 redo size
    701 bytes sent via SQL*Net to client
    508 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    5 sorts (memory)
    0 sorts (disk)
    8 rows processed
    -- i didnt understand why the above query is not using the index idx_test_s_id.
    -- But still it is faster
    select s_id, s_no, o_id, o_no
    from test_table
    where (u_id, u_no) in
    (select u_id, u_no from test_table
    minus
    select u_id, u_no from test_table
    where s_id = o_id
    or s_no = o_no)
    union all
    select o_id, o_no, s_id, s_no
    from test_table
    where (u_id, u_no) in
    (select u_id, u_no from test_table
    minus
    select u_id, u_no from test_table
    where s_id = o_id
    or s_no = o_no);
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=16 Card=2 Bytes=156)
    1 0 UNION-ALL
    2 1 FILTER
    3 2 TABLE ACCESS (FULL) OF 'TEST_TABLE' (TABLE) (Cost=3 Card=6 Bytes=468)
    4 2 MINUS
    5 4 INDEX (UNIQUE SCAN) OF 'PK_TEST' (INDEX (UNIQUE)) (Cost=1 Card=1 Bytes=26)
    6 4 TABLE ACCESS (BY INDEX ROWID) OF 'TEST_TABLE' (TABLE) (Cost=2 Card=1 Bytes=78)
    7 6 INDEX (UNIQUE SCAN) OF 'PK_TEST' (INDEX (UNIQUE)) (Cost=1 Card=1)
    8 1 FILTER
    9 8 TABLE ACCESS (FULL) OF 'TEST_TABLE' (TABLE) (Cost=3 Card=6 Bytes=468)
    10 8 MINUS
    11 10 INDEX (UNIQUE SCAN) OF 'PK_TEST' (INDEX (UNIQUE)) (Cost=1 Card=1 Bytes=26)
    12 10 TABLE ACCESS (BY INDEX ROWID) OF 'TEST_TABLE' (TABLE) (Cost=2 Card=1 Bytes=78)
    13 12 INDEX (UNIQUE SCAN) OF 'PK_TEST' (INDEX (UNIQUE)) (Cost=1 Card=1)
    Statistics
    53 recursive calls
    8 db block gets
    187 consistent gets
    0 physical reads
    0 redo size
    701 bytes sent via SQL*Net to client
    508 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    4 sorts (memory)
    0 sorts (disk)
    8 rows processed
    -- The above query is using index PK_TEST. But still it has FULL SCAN to the
    -- table two times it has the more cost.
    1st query --> SELECT STATEMENT Optimizer=ALL_ROWS (Cost=6 Card=8 Bytes=416)
    2nd query --> SELECT STATEMENT Optimizer=ALL_ROWS (Cost=16 Card=2 Bytes=156)
    My queries are:
    1) performance wise which query is better?
    2) how do i make the 1st query to use an index
    3) is there any other method to get the same result by using any index
    Appreciate your immediate help.
    Best regards
    Muthu

    Hi William
    Nice...it works.. I have added "o_id" and "o_no" are in part of the index
    and now the query uses the index
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=2 Card=8 Bytes=416)
    1 0 UNION-ALL
    2 1 INDEX (FULL SCAN) OF 'IDX_TEST_S_ID' (INDEX) (Cost=1 Card=4 Bytes=208)
    3 1 INDEX (FULL SCAN) OF 'IDX_TEST_S_ID' (INDEX) (Cost=1 Card=4 Bytes=208)
    Statistics
    7 recursive calls
    0 db block gets
    21 consistent gets
    0 physical reads
    0 redo size
    701 bytes sent via SQL*Net to client
    507 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    8 rows processed
    But my questions are:
    1) In a where clause, if "<>" condition is used, then, whether the system will use the index. Because I have observed in several situations even though the column in where clause is indexed, since the where condition is "like" or "is null/is not null"
    then the index is not used. Same as like this, i assumed, if we use <> then indexes will not be used. Is it true?
    2) Now, after adding "o_id" and "o_no" columns to the index, the Execution plan is:
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=2 Card=8 Bytes=416)
    1 0 UNION-ALL
    2 1 INDEX (FULL SCAN) OF 'IDX_TEST_S_ID' (INDEX) (Cost=1 Card=4 Bytes=208)
    3 1 INDEX (FULL SCAN) OF 'IDX_TEST_S_ID' (INDEX) (Cost=1 Card=4 Bytes=208)
    Before it was :
    Execution Plan
    0 SELECT STATEMENT Optimizer=ALL_ROWS (Cost=6 Card=8 Bytes=416)
    1 0 UNION-ALL
    2 1 TABLE ACCESS (FULL) OF 'TEST_TABLE' (TABLE) (Cost=3 Card=4 Bytes=208)
    3 1 TABLE ACCESS (FULL) OF 'TEST_TABLE' (TABLE) (Cost=3 Card=4 Bytes=208)
    Difference only in Cost (reduced), not in Card, Bytes.
    Can you explain, how can i decide which makes the performace better (Cost / Card / Bytes). Full Scan / Range Scan?
    On statistics also:
    Before:
    Statistics
    52 recursive calls
    0 db block gets
    43 consistent gets
    0 physical reads
    0 redo size
    701 bytes sent via SQL*Net to client
    507 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    8 rows processed
    After:
    Statistics
    7 recursive calls
    0 db block gets
    21 consistent gets
    0 physical reads
    0 redo size
    701 bytes sent via SQL*Net to client
    507 bytes received via SQL*Net from client
    2 SQL*Net roundtrips to/from client
    0 sorts (memory)
    0 sorts (disk)
    8 rows processed
    Difference in recursive calls & consistent gets.
    Which one shows the query with better performance?
    Please explain..
    Regards
    Muthu

  • Receiving SQL Error: INTERNAL_ERROR  while executing the query

    Dear All,
    I am receiving the below error while executing a query.
    SQL Error: INTERNAL_ERROR
    Diagnosis
    The database system registered an SQL error. As available, the error number and a description are included in the short text. Possible causes for SQL errors include:
    Overflow of database objects such as buffers, temporary tablespaces, rollback segments or data containers/tablespaces.
    ->These problems can generally be eliminated by system administrators.
    Missing generated database objects such as tables or views based on inconsistent or inactive InfoCubes or InfoObjects. Examples of this include the view of the fact table for an InfoCube or the attribute SID table (X/Y table) of a characteristic.
    -> These problems can generally be eliminated by a BW administrator.
    SQL requests with incorrect content.
    -> Problems of this type are generally programming errors.
    System Response
    Procedure
    Contact your system administrator.
    Procedure for System Administration
    If there is no error description, look for one in the reference from the database producer.
    Decide on the correct category for the SQL error and check if it can be eliminated. Generally the error can also be found in the syslog (transaction sm21). From there, transactions sm51 and sm50, the developer's trace log of the work process can be determined and the erroneous statement can be viewed in the log. This procedure is described in SAP Note 568768.
    Notification Number DBMAN 257 
    I verified the table spaces and also done RSRV Repair of InfoObjects and InfoCubes and didnt find any error. But I am receiving this error for one particular month and remaining months are executing fine. Any ideas why i am receiving this error.
    Regards
    Ravi Y

    OSS Note 1305568:
    Symptom
    A data mart query that
    you want to execute within a data transfer process (DTP), for example, terminates with the
    SQL error -1013 "Too many order columns".
    The following is displayed in the monitor log of the data transfer process:
    Error while extracting from source xxxxxx (type InfoProvider)
    Message number RSBK 242
    Exception CX_SQL_EXCEPTION occurred (program:
    CL_SQL_STATEMENT==============CP, include:
    CL_SQL_STATEMENT==============CM004, line: 32).
    Message number RS_EXCEPTION 000
    SQL error: POS(3306) Too many order columns
    Message number DBMAN 257
    Error reading the data of InfoProvider xxxxxx
    Message number DBMAN 305
    You have already implemented Note 1065380.
    Other terms
    CX_SQL_EXCEPTION, message number, RS_EXCEPTION 000, DBMAN 257,  RSBK 242,
    RS_EXCEPTION 000
    Reason and Prerequisites
    The MaxDB internal limit of 4016 bytes or 128 fields for GROUP BY columns was exceeded.
    Solution
    When you implement these corrections, no aggregation is performed for the data (GROUP BY) if the limits of the MaxDB database have been exceeded.
    The limit values for the aggregation bahavior can also be manually reduced if there are problems with the default values.
    Two RSADMIN parameters are provided for this.
    MAXDB_MAX_GROUP_BY_FLDS is the maximum number of GROUP BY fields. The default value is 128.
    MAXDB_MAX_GROUP_BY_LEN is the maximum total length of the GROUP BY fields. The default value is 4000.
    SAP NetWeaver BI 7.00
               Import Support Package 21 for SAP NetWeaver BI 7. 00 (SAPKW70021) into your BI system. The Support Package is available when Note 1270629"SAPBINews NW 7.00 BI Support Package 21", which describes this Support Package in more detail, is released for customers.

  • How to add a dynamic where clause for a sql based VO with group by query?

    Hi,
    Here is my case, I have a sql query based VO with the query like "select status, count(*) StatusCount from my_table group by status". Now I used the following java code trying to dynamically add the where clause to my VO to filter the rows based the type attribute in my DB table.
    vo.setWhereClause("type='MyType1' ");
    vo.executeQuery();
    Then I got the sql syntax error. Looks like the ADF has added the where clause to the end of my sql so my sql becomes "select status, count(*) StatusCount from my_table group by status where type='MyType1' ". But what I expected was the correct syntax "select status, count(*) StatusCount from my_table where type='MyType1' group by status".
    Does anyone know if this is an ADF bug? Or is there any other way to achieve my goal?
    Thanks,
    Chunyang
    Edited by: Chunyang on Dec 13, 2012 9:09 PM

    Hi,
    When you use setWhereClause on the VO, it is applied on top of the VO query. I.e, assume your VO has the following query.
    select empno, ename from empNow, if you apply the where clause programatically, only the two attributes that you are using in the select statement could be used. I.e
    select * from (select empno, ename from emp) where ename='KING' - VALID
    select * from (select empno, ename from emp) where deptno=10  - INVALID (because the inner query - the one you've defined as query for your vo does not have deptno attribute selected)If you would need to set a dynamic where clause, you need to make them available in your select statement / use bind variables.
    -Arun

  • Adding Selection Options Fields in Report(Using Query)

    Hi,
    how can we add Selection Fields Options in Query Reports Which we create using SQ01. I need a default option by which we can add all the selection option given by user.
    Anybody can help me..?
    Regards
    lijo Joseph

    Do you have anything defined in the 'Calcs' section?
    If so, any fields returned by the query that are not included in the calculation will be automatically added to the Group fields (using the same logic as required with calculations/group by in any SQL query). The fields won't be able to be removed from the Group list unless the Calc is also removed.

  • Exception when Adding Sql Statements in an Applet.

    Hello,
    When I have added ResultSet statements in the programme, the programme is giving me exceptions at run time as
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 2. at java.lang.Throwable.<init>(Compiled Code) at java.lang.Exception.<init>(Compiled Code) at java.sql.SQLException.<init>(Compiled Code) at sun.jdbc.odbc.JdbcOdbc.createSQLException(Compiled Code) at sun.jdbc.odbc.JdbcOdbc.standardError(Compiled Code) at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Compiled Code) at sun.jdbc.odbc.JdbcOdbcStatement.execute(Compiled Code)* at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(Compiled Code) at RegistrationApplet.actionPerformed(Compiled Code) at java.awt.Button.processActionEvent(Compiled Code) at java.awt.Button.processEvent(Compiled Code) at java.awt.Component.dispatchEventImpl(Compiled Code) at java.awt.Component.dispatchEvent(Compiled Code) at java.awt.EventDispatchThread$EventPump.dispatchEvents(Compiled Code) at java.awt.EventDispatchThread.run(Compiled Code) at netscape.applet.DerivedAppletFrame$AppletEventDispatchThread.run(Compiled Code)
    Here is the code that is generating the exception
    try
    URL url1 = new URL("http://www.abc.com/");
    URL url2 = new URL("http://www.abc.com/Re-Register.html");
    ac = getAppletContext();
    ac1 = getAppletContext();
         /* Checking whether the UserID is present or not */
    rs = st.executeQuery("select * from Register where UserID="+userid);
         if(rs.next())
         /* If the UserID is present then close the connection and ask the User to re enter the login Information*/
              rs.close();
              System.out.println("Sorry Please Re-Register");
              ac1.showDocument(url2);
         else
              System.out.println("insert into Register values('"+firstname+"','"+lastname+"','"+address+"','"+country+"',"+phonenumber+",'"+emailid+"','"+userid+"','"+password+"','"+b+"')");
                                  int x = st.executeUpdate("insert into Register values('"+firstname+"','"+lastname+"','"+address+"','"+country+"',"+phonenumber+",'"+emailid+"','"+userid+"','"+password+"','"+b+"')");
                                  System.out.println("inserted" + x);
         ac.showDocument(url1);
    catch(Exception e)
         e.printStackTrace();
    Can any one help me where am I wring? The Exception is in
    rs = st.executeQuery("select * from Register where UserID="+userid);
    Thanks
    Regards
    Uma

    So your query is something like "select * from Register where UserID=uma". This compares the field UserID to the field uma, which almost certainly doesn't work. You want your query to look like "select * from Register where UserID='uma'".

  • Help: SQL to select closest points within groups of records grouped by time

    Hi,
    I need help to find an SQL for efficient solution for the following problem:
    - I have 20 buses circling on one bus route and their locations are reported every 10 seconds and recorded into a spatial table “bus_location” with “bus_loc” as SDO_GEOMETRY type.
    - Each bus location record there has a msg_datetime column with the time when the location was recorded.
    - Buses circle the bus route 8-12 times, from A to B, then from B back to A, then new loop from A to B, and so on.
    - I have 3 timing points in spatial table “timing_point” with “tp_loc” as SDO_GEOMETRY type.
    - A bus will pass each timing point 8-12 times in one direction and 8-12 times in the other direction, while making loops on the bus route.
    My task is: for each timing point, for each bus, for each trip direction (A-B or B-A), find the closest bus location to that timing point.
    Example:
    Bus...*TimingPoint*......*Time*.....*Distance*
    ...........................................*between*
    ...........................................*bus and TP*
    12......A................14:01:00......250 m
    12......A................14:01:10......150 m
    12......A................14:01:20......12 m <== This is the record closest to the TP for this pass
    12......A................14:01:30......48 m
    12......A................14:01:40......100 m
    12......A................14:01:50......248 m
    12......A................14:29:40......122 m
    12......A................14:29:50......72 m
    12......A................14:30:00......9 m <== This is the record closest to the TP for this pass
    12......A................14:30:10......10 m
    12......A................14:30:20......12 m
    I tried to use SDO_NN and I can get closest bus locations, but how to find the closest bus location for each pass? Or how to identify a groups of bus locations which are together within 2-3 minutes and to find closest record for each of these groups of locations?
    Thank you very much for any help.
    Milan
    Edited by: mburazor on 9-Feb-2012 2:41 PM

    Milan,
    Yes, the problem is one of analytics not spatial. Here is another go that should be independent of year/month/date/hour/minute
    as it does all its math based on an absolute number of minutes since 1970. I round to 5 minutes but you could round/trunc to any
    particular interval (5 minutes, 10 minutes, 15 minutes etc)
    Note that I have created extra records in the same table that I built. (Tip: good idea to provide a sample dataset to the forum when
    asking difficult SQL questions like this.)
    drop table buslocns;
    create table buslocns(
    busno number,
    timingpt varchar2(1),
    pttime   timestamp,
    distance number)
    insert into buslocns values (12,'A',to_timestamp('2012/02/10 14:01:00','YYYY/MM/DD HH24:MI:SS'),250);
    insert into buslocns values (12,'A',to_timestamp('2012/02/10 14:01:10','YYYY/MM/DD HH24:MI:SS'),150);
    insert into buslocns values (12,'A',to_timestamp('2012/02/10 14:01:20','YYYY/MM/DD HH24:MI:SS'),12);
    insert into buslocns values (12,'A',to_timestamp('2012/02/10 14:01:30','YYYY/MM/DD HH24:MI:SS'),48);
    insert into buslocns values (12,'A',to_timestamp('2012/02/10 14:01:40','YYYY/MM/DD HH24:MI:SS'),100);
    insert into buslocns values (12,'A',to_timestamp('2012/02/10 14:01:50','YYYY/MM/DD HH24:MI:SS'),248);
    insert into buslocns values (12,'A',to_timestamp('2012/02/10 14:29:40','YYYY/MM/DD HH24:MI:SS'),122);
    insert into buslocns values (12,'A',to_timestamp('2012/02/10 14:29:50','YYYY/MM/DD HH24:MI:SS'),72);
    insert into buslocns values (12,'A',to_timestamp('2012/02/10 14:30:00','YYYY/MM/DD HH24:MI:SS'),9);
    insert into buslocns values (12,'A',to_timestamp('2012/02/10 14:30:10','YYYY/MM/DD HH24:MI:SS'),10);
    insert into buslocns values (12,'A',to_timestamp('2012/02/10 14:30:20','YYYY/MM/DD HH24:MI:SS'),12);
    insert into buslocns values (12,'A',to_timestamp('2012/02/10 14:59:40','YYYY/MM/DD HH24:MI:SS'),53);
    insert into buslocns values (12,'A',to_timestamp('2012/02/10 14:59:50','YYYY/MM/DD HH24:MI:SS'),28);
    insert into buslocns values (12,'A',to_timestamp('2012/02/10 15:00:00','YYYY/MM/DD HH24:MI:SS'),12);
    insert into buslocns values (12,'A',to_timestamp('2012/02/10 15:00:10','YYYY/MM/DD HH24:MI:SS'),73);
    insert into buslocns values (12,'A',to_timestamp('2012/02/10 14:44:40','YYYY/MM/DD HH24:MI:SS'),53);
    insert into buslocns values (12,'A',to_timestamp('2012/02/10 14:44:50','YYYY/MM/DD HH24:MI:SS'),28);
    insert into buslocns values (12,'A',to_timestamp('2012/02/10 15:45:00','YYYY/MM/DD HH24:MI:SS'),12);
    insert into buslocns values (12,'A',to_timestamp('2012/02/10 15:45:10','YYYY/MM/DD HH24:MI:SS'),73);
    commit;
    with tensOfMinutes as (
    select row_number() over (order by busno,timingpt, pttime) as rid,
           busno,
           timingpt,
           pttime,
           round(((cast(pttime as date) - cast('01-JAN-1970' as date)) * 1440) / 5) * 5 as mins,
           distance
      from BUSLOCNS
    select busno,timingpt,to_char(to_date('01-JAN-1970','DD-MON-YYYY') + ( mins / 1440 ),'DD-MON-YYYY HH24:MI:SS') as pttime,minDist
      from (select busno,timingpt,mins,min(distance) as minDist
              from tensOfMinutes a
             group by a.busno, a.timingpt, a.mins
             order by 1, 2, 3 ) ;
    -- Result
    BUSNO                  TIMINGPT PTTIME               MINDIST
    12                     A        10-FEB-2012 14:00:00 12
    12                     A        10-FEB-2012 14:30:00 9
    12                     A        10-FEB-2012 14:45:00 28
    12                     A        10-FEB-2012 15:00:00 12
    12                     A        10-FEB-2012 15:45:00 12regards
    Simon

Maybe you are looking for