ORA-01467: sort key too long

Hi,
I am trying to run the below query in toad but getting the error "ORA-01467: sort key too long".
SELECT :o,
:o,
MSD,
1,
SUM(FLAG),
DECODE(SUM(FLAGCOLOR),0,0,1),
SUM(DECODE(SIGN(Tiefool), -1,'',Tiefool)),
SUM(DECODE(SIGN(Tiegreen), -1,'',Tiegreen)),
SUM(DECODE(SIGN(TiesacTotaru), -1,'',TiesacTotaru)),
SUM(DECODE(SIGN(Tiesaccfaru), -1,'',Tiesaccfaru)),
SUM(DECODE(SIGN(Tiel), -1,'',Tiel)),
SUM(DECODE(SIGN(Tiemannj), -1,'',Tiemannj)),
SUM(DECODE(SIGN(HiYaNo57), -1,'',HiYaNo57)),
SUM(DECODE(SIGN(HiYaNoAttOIRHoLad), -1,'',HiYaNoAttOIRHoLad)),
SUM(DECODE(SIGN(HiYaNoAttOIRHomannj), -1,'',HiYaNoAttOIRHomannj)),
SUM(DECODE(SIGN(HiYaNoAttOIRHosmrlone), -1,'',HiYaNoAttOIRHosmrlone)),
SUM(DECODE(SIGN(HiYaNoAttOSwHomannj), -1,'',HiYaNoAttOSwHomannj)),
SUM(DECODE(SIGN(HiYaNoFlOIRHoCs57jFlr),-1,'',HiYaNoFlOIRHoCs57jFlr)),
SUM(DECODE(SIGN(HiYaNoFlOIRHoCs57Re_00), -1,'',HiYaNoFlOIRHoCs57Re_00)),
SUM(DECODE(SIGN(HiYaNoFlOIRHoCs57Re_01), -1,'',HiYaNoFlOIRHoCs57Re_01)),
SUM(DECODE(SIGN(HiYaNoFlOIRHoCs57Ue_00), -1,'',HiYaNoFlOIRHoCs57Ue_00)),
SUM(DECODE(SIGN(HiYaNoFlOIRHoLadG_00), -1,'',HiYaNoFlOIRHoLadG_00)),
SUM(DECODE(SIGN(HiYaNoFlOIRHoLadR_00), -1,'',HiYaNoFlOIRHoLadR_00)),
SUM(DECODE(SIGN(HiYaNoFlOIRHoLadR_01), -1,'',HiYaNoFlOIRHoLadR_01)),
SUM(DECODE(SIGN(HiYaNoFlOIRHoLadU_00), -1,'',HiYaNoFlOIRHoLadU_00)),
SUM(DECODE(SIGN(HiYaNoFlOIRHomannj_00), -1,'',HiYaNoFlOIRHomannj_00)),
SUM(DECODE(SIGN(HiYaNoFlOIRHomannj_01), -1,'',HiYaNoFlOIRHomannj_01)),
SUM(DECODE(SIGN(HiYaNoFlOIRHomannj_02), -1,'',HiYaNoFlOIRHomannj_02)),
SUM(DECODE(SIGN(HiYaNoFlOIRHomannj_03), -1,'',HiYaNoFlOIRHomannj_03)),
SUM(DECODE(SIGN(HiYaNoFlOIRHosmr_00), -1,'',HiYaNoFlOIRHosmr_00)),
SUM(DECODE(SIGN(HiYaNoFlOIRHosmr_01), -1,'',HiYaNoFlOIRHosmr_01)),
SUM(DECODE(SIGN(HiYaNoFlOIRHosmr_02), -1,'',HiYaNoFlOIRHosmr_02)),
SUM(DECODE(SIGN(HiYaNoFlOIRHosmr_03), -1,'',HiYaNoFlOIRHosmr_03)),
SUM(DECODE(SIGN(HiYaNoFlOSwHomannj_00), -1,'',HiYaNoFlOSwHomannj_00)),
SUM(DECODE(SIGN(HiYaNoFlOSwHomannj_01), -1,'',HiYaNoFlOSwHomannj_01)),
SUM(DECODE(SIGN(HiYaNoFlOSwHomannj_02), -1,'',HiYaNoFlOSwHomannj_02)),
SUM(DECODE(SIGN(HiYaNoFlOSwHomannj_03), -1,'',HiYaNoFlOSwHomannj_03)),
SUM(DECODE(SIGN(HiYaNoOIRCckOldCh), -1,'',HiYaNoOIRCckOldCh)),
SUM(DECODE(SIGN(HiYaNoOIRCcq), -1,'',HiYaNoOIRCcq)),
SUM(DECODE(SIGN(HiYaNoOIRHocAl_00), -1,'',HiYaNoOIRHocAl_00)),
SUM(DECODE(SIGN(HiYaNoOIRHokOldC_00), -1,'',HiYaNoOIRHokOldC_00)),
SUM(DECODE(SIGN(HiYaNoOIRHokOldC_01), -1,'',HiYaNoOIRHokOldC_01)),
SUM(DECODE(SIGN(HiYaNoOIRHoq), -1,'',HiYaNoOIRHoq)),
SUM(DECODE(SIGN(HiYatoyCs57), -1,'',HiYatoyCs57)),
SUM(DECODE(SIGN(HiYatoyLad), -1,'',HiYatoyLad)),
SUM(DECODE(SIGN(HiYatoymannj), -1,'',HiYatoymannj)),
SUM(DECODE(SIGN(HiYatoysmrlone),-1,'',HiYatoysmrlone)),
SUM(DECODE(SIGN(HiYaNoplymannj), -1,'',HiYaNoplymannj)),
SUM(DECODE(SIGN(redAtt), -1,'',redAtt)),
SUM(DECODE(SIGN(NoYaNoOutIratHoAtt), -1,'',NoYaNoOutIratHoAtt)),
SUM(DECODE(SIGN(vavaYakcttntodef), -1,'',vavaYakcttntodef)),
SUM(DECODE(SIGN(vavaYakcttntoMan), -1,'',vavaYakcttntoMan)),
SUM(DECODE(SIGN(vavaYaNoddvac), -1,'',vavaYaNoddvac)),
SUM(DECODE(SIGN(vavaYaNordvac), -1,'',vavaYaNordvac)),
SUM(DECODE(SIGN(vavaYasalRlcTotPktThp), -1,'',vavaYasalRlcTotPktThp)),
SUM(DECODE(SIGN(vavaYasalRlccfPktThp),-1,'',vavaYasalRlccfPktThp)),
SUM(DECODE(SIGN(vavaYamilRlcTotPktThp), -1,'',vavaYamilRlcTotPktThp)),
SUM(DECODE(SIGN(vavaYamilRlccfPktThp), -1,'',vavaYamilRlccfPktThp)),
SUM(DECODE(SIGN(MyYaNoauwcupytr00),-1,'',MyYaNoauwcupytr00)),
SUM(DECODE(SIGN(MyYaNoauwcupytr01),-1,'',MyYaNoauwcupytr01)),
SUM(DECODE(SIGN(MyYaNoauwcupytr02),-1,'',MyYaNoauwcupytr02)),
SUM(DECODE(SIGN(MyYaNoauwcupytr03),-1,'',MyYaNoauwcupytr03)),
SUM(DECODE(SIGN(MyYaNoauwcupytr04),-1,'',MyYaNoauwcupytr04)),
SUM(DECODE(SIGN(MyYaNoauwcupytr05),-1,'',MyYaNoauwcupytr05)),
SUM(DECODE(SIGN(MyYaNoauwcupytr06),-1,'',MyYaNoauwcupytr06)),
SUM(DECODE(SIGN(MyYaNoauwcupytr07),-1,'',MyYaNoauwcupytr07)),
SUM(DECODE(SIGN(MyYaNoauwcupytr08),-1,'',MyYaNoauwcupytr08)),
SUM(DECODE(SIGN(MyYaNoauwcupytr09),-1,'',MyYaNoauwcupytr09)),
SUM(DECODE(SIGN(MyYaNoauwcupytr10),-1,'',MyYaNoauwcupytr10)),
SUM(DECODE(SIGN(MyYaNoauwcupytr11),-1,'',MyYaNoauwcupytr11)),
SUM(DECODE(SIGN(MyYaNoauwcupytr12),-1,'',MyYaNoauwcupytr12)),
SUM(DECODE(SIGN(MyYaNoauwcupytr13),-1,'',MyYaNoauwcupytr13)),
SUM(DECODE(SIGN(MyYaNoauwcupytr14),-1,'',MyYaNoauwcupytr14)),
SUM(DECODE(SIGN(MyYaNoauwcupytr15),-1,'',MyYaNoauwcupytr15)),
SUM(DECODE(SIGN(MyYaNoravmyfFra00),-1,'',MyYaNoravmyfFra00)),
SUM(DECODE(SIGN(MyYaNoravmyfFra01),-1,'',MyYaNoravmyfFra01)),
SUM(DECODE(SIGN(MyYaNoravmyfFra02),-1,'',MyYaNoravmyfFra02)),
SUM(DECODE(SIGN(MyYaNoravmyfFra03),-1,'',MyYaNoravmyfFra03)),
SUM(DECODE(SIGN(MyYaNoravmyfFra04),-1,'',MyYaNoravmyfFra04)),
SUM(DECODE(SIGN(MyYaNoravmyfFra05),-1,'',MyYaNoravmyfFra05)),
SUM(DECODE(SIGN(MyYaNoravmyfFra06),-1,'',MyYaNoravmyfFra06)),
SUM(DECODE(SIGN(MyYaNoravmyfFra07),-1,'',MyYaNoravmyfFra07)),
SUM(DECODE(SIGN(MyYaNoravmyfFra08),-1,'',MyYaNoravmyfFra08)),
SUM(DECODE(SIGN(MyYaNoravmyfFra09),-1,'',MyYaNoravmyfFra09)),
SUM(DECODE(SIGN(MyYaNoravmyfFra10),-1,'',MyYaNoravmyfFra10)),
SUM(DECODE(SIGN(MyYaNoravmyfFra11),-1,'',MyYaNoravmyfFra11)),
SUM(DECODE(SIGN(MyYaNoravmyfFra12),-1,'',MyYaNoravmyfFra12)),
SUM(DECODE(SIGN(MyYaNoravmyfFra13),-1,'',MyYaNoravmyfFra13)),
SUM(DECODE(SIGN(MyYaNoravmyfFra14),-1,'',MyYaNoravmyfFra14)),
SUM(DECODE(SIGN(MyYaNoravmyfFra15),-1,'',MyYaNoravmyfFra15)),
SUM(DECODE(SIGN(MyYamigtumytr00), -1,'',MyYamigtumytr00)),
SUM(DECODE(SIGN(MyYamigtumytr01), -1,'',MyYamigtumytr01)),
SUM(DECODE(SIGN(MyYamigtumytr02), -1,'',MyYamigtumytr02)),
SUM(DECODE(SIGN(MyYamigtumytr03), -1,'',MyYamigtumytr03)),
SUM(DECODE(SIGN(MyYamigtumytr04), -1,'',MyYamigtumytr04)),
SUM(DECODE(SIGN(MyYamigtumytr05), -1,'',MyYamigtumytr05)),
SUM(DECODE(SIGN(MyYamigtumytr06), -1,'',MyYamigtumytr06)),
SUM(DECODE(SIGN(MyYamigtumytr07), -1,'',MyYamigtumytr07)),
SUM(DECODE(SIGN(MyYamigtumytr08), -1,'',MyYamigtumytr08)),
SUM(DECODE(SIGN(MyYamigtumytr09), -1,'',MyYamigtumytr09)),
SUM(DECODE(SIGN(MyYamigtumytr10), -1,'',MyYamigtumytr10)),
SUM(DECODE(SIGN(MyYamigtumytr11), -1,'',MyYamigtumytr11)),
SUM(DECODE(SIGN(MyYamigtumytr12), -1,'',MyYamigtumytr12)),
SUM(DECODE(SIGN(MyYamigtumytr13), -1,'',MyYamigtumytr13)),
SUM(DECODE(SIGN(MyYamigtumytr14), -1,'',MyYamigtumytr14)),
SUM(DECODE(SIGN(MyYamigtumytr15), -1,'',MyYamigtumytr15)),
SUM(DECODE(SIGN(MyYaSUMlolytr00), -1,'',MyYaSUMlolytr00)),
SUM(DECODE(SIGN(MyYaSUMlolytr01), -1,'',MyYaSUMlolytr01)),
SUM(DECODE(SIGN(MyYaSUMlolytr02), -1,'',MyYaSUMlolytr02)),
SUM(DECODE(SIGN(MyYaSUMlolytr03), -1,'',MyYaSUMlolytr03)),
SUM(DECODE(SIGN(MyYaSUMlolytr04), -1,'',MyYaSUMlolytr04)),
SUM(DECODE(SIGN(MyYaSUMlolytr05), -1,'',MyYaSUMlolytr05)),
SUM(DECODE(SIGN(MyYaSUMlolytr06), -1,'',MyYaSUMlolytr06)),
SUM(DECODE(SIGN(MyYaSUMlolytr07), -1,'',MyYaSUMlolytr07)),
SUM(DECODE(SIGN(MyYaSUMlolytr08), -1,'',MyYaSUMlolytr08)),
SUM(DECODE(SIGN(MyYaSUMlolytr09), -1,'',MyYaSUMlolytr09)),
SUM(DECODE(SIGN(MyYaSUMlolytr10), -1,'',MyYaSUMlolytr10)),
SUM(DECODE(SIGN(MyYaSUMlolytr11), -1,'',MyYaSUMlolytr11)),
SUM(DECODE(SIGN(MyYaSUMlolytr12), -1,'',MyYaSUMlolytr12)),
SUM(DECODE(SIGN(MyYaSUMlolytr13), -1,'',MyYaSUMlolytr13)),
SUM(DECODE(SIGN(MyYaSUMlolytr14), -1,'',MyYaSUMlolytr14)),
SUM(DECODE(SIGN(MyYaSUMlolytr15), -1,'',MyYaSUMlolytr15)),
SUM(DECODE(SIGN(MyYaSUMgrtytr00), -1,'',MyYaSUMgrtytr00)),
SUM(DECODE(SIGN(MyYaSUMgrtytr01), -1,'',MyYaSUMgrtytr01)),
SUM(DECODE(SIGN(MyYaSUMgrtytr02), -1,'',MyYaSUMgrtytr02)),
SUM(DECODE(SIGN(MyYaSUMgrtytr03), -1,'',MyYaSUMgrtytr03)),
SUM(DECODE(SIGN(MyYaSUMgrtytr04), -1,'',MyYaSUMgrtytr04)),
SUM(DECODE(SIGN(MyYaSUMgrtytr05), -1,'',MyYaSUMgrtytr05)),
SUM(DECODE(SIGN(MyYaSUMgrtytr06), -1,'',MyYaSUMgrtytr06)),
SUM(DECODE(SIGN(MyYaSUMgrtytr07), -1,'',MyYaSUMgrtytr07)),
SUM(DECODE(SIGN(MyYaSUMgrtytr08), -1,'',MyYaSUMgrtytr08)),
SUM(DECODE(SIGN(MyYaSUMgrtytr09), -1,'',MyYaSUMgrtytr09)),
SUM(DECODE(SIGN(MyYaSUMgrtytr10), -1,'',MyYaSUMgrtytr10)),
SUM(DECODE(SIGN(MyYaSUMgrtytr11), -1,'',MyYaSUMgrtytr11)),
SUM(DECODE(SIGN(MyYaSUMgrtytr12), -1,'',MyYaSUMgrtytr12)),
SUM(DECODE(SIGN(MyYaSUMgrtytr13), -1,'',MyYaSUMgrtytr13)),
SUM(DECODE(SIGN(MyYaSUMgrtytr14), -1,'',MyYaSUMgrtytr14)),
SUM(DECODE(SIGN(MyYaSUMgrtytr15), -1,'',MyYaSUMgrtytr15)),
SUM(DECODE(SIGN(MyYamigcfvw00),-1,'',MyYamigcfvw00)),
SUM(DECODE(SIGN(MyYamigcfvw01),-1,'',MyYamigcfvw01)),
SUM(DECODE(SIGN(MyYamigcfvw02),-1,'',MyYamigcfvw02)),
SUM(DECODE(SIGN(MyYamigcfvw03),-1,'',MyYamigcfvw03)),
SUM(DECODE(SIGN(MyYamigcfvw04),-1,'',MyYamigcfvw04)),
SUM(DECODE(SIGN(MyYamigcfvw05),-1,'',MyYamigcfvw05)),
SUM(DECODE(SIGN(MyYamigcfvw06),-1,'',MyYamigcfvw06)),
SUM(DECODE(SIGN(MyYamigcfvw07),-1,'',MyYamigcfvw07)),
SUM(DECODE(SIGN(MyYamigcfvw08),-1,'',MyYamigcfvw08)),
SUM(DECODE(SIGN(MyYamigcfvw09),-1,'',MyYamigcfvw09)),
SUM(DECODE(SIGN(MyYamigcfvw10),-1,'',MyYamigcfvw10)),
SUM(DECODE(SIGN(MyYamigcfvw11),-1,'',MyYamigcfvw11)),
SUM(DECODE(SIGN(MyYamigcfvw12),-1,'',MyYamigcfvw12)),
SUM(DECODE(SIGN(MyYamigcfvw13),-1,'',MyYamigcfvw13)),
SUM(DECODE(SIGN(MyYamigcfvw14),-1,'',MyYamigcfvw14)),
SUM(DECODE(SIGN(MyYamigcfvw15),-1,'',MyYamigcfvw15)),
SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr00), -1,'',MyYaSUMNoOfcfsytr00)),
SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr01), -1,'',MyYaSUMNoOfcfsytr01)),
SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr02), -1,'',MyYaSUMNoOfcfsytr02)),
SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr03), -1,'',MyYaSUMNoOfcfsytr03)),
SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr04), -1,'',MyYaSUMNoOfcfsytr04)),
SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr05), -1,'',MyYaSUMNoOfcfsytr05)),
SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr06), -1,'',MyYaSUMNoOfcfsytr06)),
SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr07), -1,'',MyYaSUMNoOfcfsytr07)),
SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr08), -1,'',MyYaSUMNoOfcfsytr08)),
SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr09), -1,'',MyYaSUMNoOfcfsytr09)),
SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr10), -1,'',MyYaSUMNoOfcfsytr10)),
SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr11), -1,'',MyYaSUMNoOfcfsytr11)),
SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr12), -1,'',MyYaSUMNoOfcfsytr12)),
SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr13), -1,'',MyYaSUMNoOfcfsytr13)),
SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr14), -1,'',MyYaSUMNoOfcfsytr14)),
SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr15), -1,'',MyYaSUMNoOfcfsytr15)),
SUM(DECODE(SIGN(MyYamiiitum00),-1,'',MyYamiiitum00)),
SUM(DECODE(SIGN(MyYamiiitum01),-1,'',MyYamiiitum01)),
SUM(DECODE(SIGN(MyYamiiitum02),-1,'',MyYamiiitum02)),
SUM(DECODE(SIGN(MyYamiiitum03),-1,'',MyYamiiitum03)),
SUM(DECODE(SIGN(MyYamiiitum04),-1,'',MyYamiiitum04)),
SUM(DECODE(SIGN(MyYamiiitum05),-1,'',MyYamiiitum05)),
SUM(DECODE(SIGN(MyYamiiitum06),-1,'',MyYamiiitum06)),
SUM(DECODE(SIGN(MyYamiiitum07),-1,'',MyYamiiitum07)),
SUM(DECODE(SIGN(MyYamiiitum08),-1,'',MyYamiiitum08)),
SUM(DECODE(SIGN(MyYamiiitum09),-1,'',MyYamiiitum09)),
SUM(DECODE(SIGN(MyYamiiitum10),-1,'',MyYamiiitum10)),
SUM(DECODE(SIGN(MyYamiiitum11),-1,'',MyYamiiitum11)),
SUM(DECODE(SIGN(MyYamiiitum12),-1,'',MyYamiiitum12)),
SUM(DECODE(SIGN(MyYamiiitum13),-1,'',MyYamiiitum13)),
SUM(DECODE(SIGN(MyYamiiitum14),-1,'',MyYamiiitum14)),
SUM(DECODE(SIGN(MyYamiiitum15),-1,'',MyYamiiitum15)),
SUM(DECODE(SIGN(Cart),-1,'',Cart)),
SUM(DECODE(SIGN(Carg),-1,'',Carg)),
SUM(DECODE(SIGN(Carw), -1,'',Carw)),
SUM(DECODE(SIGN(Cars), -1,'',Cars)),
SUM(DECODE(SIGN(Carx),-1,'',Carx)),
SUM(DECODE(SIGN(Cara), -1,'',Cara)),
SUM(DECODE(SIGN(Carxs), -1,'',Carxs)),
SUM(DECODE(SIGN(Carq),-1,'',Carq)),
SUM(DECODE(SIGN(Carp),-1,'',Carp)),
SUM(DECODE(SIGN(Cark),-1,'',Cark)),
SUM(DECODE(SIGN(Carg), -1,'',Carg)),
SUM(DECODE(SIGN(Carn), -1,'',Carn)),
SUM(DECODE(SIGN(CarYgh), -1,'',CarYgh)),
SUM(DECODE(SIGN(Carty), -1,'',Carty)),
SUM(DECODE(SIGN(Carzx), -1,'',Carzx)),
SUM(DECODE(SIGN(asdef), -1,'',asdef)),
SUM(DECODE(SIGN(toyYaIncup), -1,'',toyYaIncup)),
SUM(DECODE(SIGN(toyYaInLostcup), -1,'',toyYaInLostcup)),
SUM(DECODE(SIGN(toyYaInOutOfwcup),-1,'',toyYaInOutOfwcup)),
SUM(DECODE(SIGN(toyYaOutcup), -1,'',toyYaOutcup)),
SUM(DECODE(SIGN(manYaNoddSdulk128), -1,'',manYaNoddSdulk128)),
SUM(DECODE(SIGN(manYaNoddSdulk256), -1,'',manYaNoddSdulk256)),
SUM(DECODE(SIGN(manYaNoddSdulk64), -1,'',manYaNoddSdulk64)),
SUM(DECODE(SIGN(fudYaDlfd12PsStrMwm128),-1,'',fudYaDlfd12PsStrMwm128)),
SUM(DECODE(SIGN(fudYaDlfd12PsStrMwm256),-1,'',fudYaDlfd12PsStrMwm256)),
SUM(DECODE(SIGN(fudYaDlfd12PsStrMwms64),-1,'',fudYaDlfd12PsStrMwms64)),
SUM(DECODE(SIGN(fudYaMwmsghCongTo), -1,'',fudYaMwmsghCongTo)),
SUM(DECODE(SIGN(fudYaMwmscttntodef), -1,'',fudYaMwmscttntodef)),
SUM(DECODE(SIGN(fudYaMwmscttntoMan), -1,'',fudYaMwmscttntoMan)),
SUM(DECODE(SIGN(fudYaNoamMwms09),-1,'',fudYaNoamMwms09)),
SUM(DECODE(SIGN(fudYaNoFldMwmsSesLackRnRe),-1,'',fudYaNoFldMwmsSesLackRnRe)),
SUM(DECODE(SIGN(fudYaNoFldMwmsSesLackTnRe),-1,'',fudYaNoFldMwmsSesLackTnRe)),
SUM(DECODE(SIGN(fudYaNoqessMwms09),-1,'',fudYaNoqessMwms09)),
SUM(DECODE(SIGN(fudYaNoqMwmsSesrr), -1,'',fudYaNoqMwmsSesrr)),
SUM(DECODE(SIGN(fudYaNoteMwmsSesStop), -1,'',fudYaNoteMwmsSesStop)),
SUM(DECODE(SIGN(fudYaslesMwmslg), -1,'',fudYaslesMwmslg)),
SUM(DECODE(SIGN(fudYaslesPsStrMwms64Rl),-1,'',fudYaslesPsStrMwms64Rl)),
SUM(DECODE(SIGN(fudYasPsStrMwms128RlcU),-1,'',fudYasPsStrMwms128RlcU)),
SUM(DECODE(SIGN(fudYasPsStrMwms256RlcU),-1,'',fudYasPsStrMwms256RlcU)),
SUM(DECODE(SIGN(fudYamiwmslg), -1,'',fudYamiwmslg)),
SUM(DECODE(SIGN(fudYamisStrMwms128RlcUs),-1,'',fudYamisStrMwms128RlcUs)),
SUM(DECODE(SIGN(fudYamisStrMwms256RlcUs),-1,'',fudYamisStrMwms256RlcUs)),
SUM(DECODE(SIGN(fudYamisStrMwms64RlcUse),-1,'',fudYamisStrMwms64RlcUse)),
SUM(DECODE(SIGN(cosYaAgpsam), -1,'',cosYaAgpsam)),
SUM(DECODE(SIGN(cosYaAgpsqQosNotOk), -1,'',cosYaAgpsqQosNotOk)),
SUM(DECODE(SIGN(cosYaAgpsqQosOk), -1,'',cosYaAgpsqQosOk)),
SUM(DECODE(SIGN(cosYaghIdam), -1,'',cosYaghIdam)),
SUM(DECODE(SIGN(cosYaghIdqQosNotOk),-1,'',cosYaghIdqQosNotOk)),
SUM(DECODE(SIGN(cosYaghIdqQosOk), -1,'',cosYaghIdqQosOk)),
SUM(DECODE(SIGN(cosYaRttam), -1,'',cosYaRttam)),
SUM(DECODE(SIGN(cosYaRttqQosNotOk), -1,'',cosYaRttqQosNotOk)),
SUM(DECODE(SIGN(cosYaRttqQosOk), -1,'',cosYaRttqQosOk)),
SUM(DECODE(SIGN(app_YaFaultycrwlocks), -1,'',app_YaFaultycrwlocks)),
SUM(DECODE(SIGN(app_YaFrmNoOfDiscappcup), -1,'',app_YaFrmNoOfDiscappcup)),
SUM(DECODE(SIGN(app_YaNoRecsheAccqess), -1,'',app_YaNoRecsheAccqess)),
SUM(DECODE(SIGN(app_Yacrwlocks), -1,'',app_Yacrwlocks)),
SUM(DECODE(SIGN(galAttNonloveIeFqHoCsC_00), -1,'',galAttNonloveIeFqHoCsC_00)),
SUM(DECODE(SIGN(galAttNonloveIeFqHoCsS_00), -1,'',galAttNonloveIeFqHoCsS_00)),
SUM(DECODE(SIGN(galAttNonloveIeFqHoPsI_00), -1,'',galAttNonloveIeFqHoPsI_00)),
SUM(DECODE(SIGN(galAttNonloveIeFqHoPsI_01), -1,'',galAttNonloveIeFqHoPsI_01)),
SUM(DECODE(SIGN(galAttNonloveIeFqHoStr_00), -1,'',galAttNonloveIeFqHoStr_00)),
SUM(DECODE(SIGN(galFlNonloveIeFqHoFa_00), -1,'',galFlNonloveIeFqHoFa_00)),
SUM(DECODE(SIGN(galFlNonloveIeFqHoFa_01), -1,'',galFlNonloveIeFqHoFa_01)),
SUM(DECODE(SIGN(galFlNonloveIeFqHoFa_02), -1,'',galFlNonloveIeFqHoFa_02)),
SUM(DECODE(SIGN(galFlNonloveIeFqHoFa_03), -1,'',galFlNonloveIeFqHoFa_03)),
SUM(DECODE(SIGN(galFlNonloveIeFqHoFa_04), -1,'',galFlNonloveIeFqHoFa_04)),
SUM(DECODE(SIGN(galFlNonloveIeFqHoRe_00), -1,'',galFlNonloveIeFqHoRe_00)),
SUM(DECODE(SIGN(galFlNonloveIeFqHoRe_01), -1,'',galFlNonloveIeFqHoRe_01)),
SUM(DECODE(SIGN(galFlNonloveIeFqHoRe_02), -1,'',galFlNonloveIeFqHoRe_02)),
SUM(DECODE(SIGN(galFlNonloveIeFqHoRe_03), -1,'',galFlNonloveIeFqHoRe_03)),
SUM(DECODE(SIGN(galFlNonloveIeFqHoRe_04), -1,'',galFlNonloveIeFqHoRe_04)),
SUM(DECODE(SIGN(galNoAttOCnhhoCsNonmannj), -1,'',galNoAttOCnhhoCsNonmannj)),
SUM(DECODE(SIGN(galNoAttOCnhhoPsdeeRe_00), -1,'',galNoAttOCnhhoPsdeeRe_00)),
SUM(DECODE(SIGN(galNoAttOutCnhhomannj), -1,'',galNoAttOutCnhhomannj)),
SUM(DECODE(SIGN(galNoqOCnhhoCsNonmannj),-1,'',galNoqOCnhhoCsNonmannj)),
SUM(DECODE(SIGN(galNoqOutCnhhomannj), -1,'',galNoqOutCnhhomannj)),
SUM(DECODE(SIGN(galRlAddwtswestghC_00), -1,'',galRlAddwtswestghC_00)),
SUM(DECODE(SIGN(galRlAddwtswestghP_00), -1,'',galRlAddwtswestghP_00)),
SUM(DECODE(SIGN(galRlAddwtswestghP_01), -1,'',galRlAddwtswestghP_01)),
SUM(DECODE(SIGN(galRlAddwtswestgk_00), -1,'',galRlAddwtswestgk_00)),
SUM(DECODE(SIGN(galRlAddwtswestgk_01), -1,'',galRlAddwtswestgk_01)),
SUM(DECODE(SIGN(galRlAddwtswestgk_02), -1,'',galRlAddwtswestgk_02)),
SUM(DECODE(SIGN(galRlAddqwestghCs_00), -1,'',galRlAddqwestghCs_00)),
SUM(DECODE(SIGN(galRlAddqwestghPk_00), -1,'',galRlAddqwestghPk_00)),
SUM(DECODE(SIGN(galRlAddqwestghPk_01), -1,'',galRlAddqwestghPk_01)),
SUM(DECODE(SIGN(galRlAddqwestgkp_00), -1,'',galRlAddqwestgkp_00)),
SUM(DECODE(SIGN(galRlAddqwestgkt_00), -1,'',galRlAddqwestgkt_00)),
SUM(DECODE(SIGN(galRlAddqwestgkt_01), -1,'',galRlAddqwestgkt_01)),
SUM(DECODE(SIGN(galqNonloveIeFqHoCs_00), -1,'',galqNonloveIeFqHoCs_00)),
SUM(DECODE(SIGN(galqNonloveIeFqHoCs_01), -1,'',galqNonloveIeFqHoCs_01)),
SUM(DECODE(SIGN(galqNonloveIeFqHoPs_00), -1,'',galqNonloveIeFqHoPs_00)),
SUM(DECODE(SIGN(galqNonloveIeFqHoPs_01), -1,'',galqNonloveIeFqHoPs_01)),
SUM(DECODE(SIGN(galqNonloveIeFqHoSt_00), -1,'',galqNonloveIeFqHoSt_00)),
SUM(DECODE(SIGN(smleYaIfInOctetsHi), -1,'',smleYaIfInOctetsHi)),
SUM(DECODE(SIGN(smleYaIfInOctetsLo), -1,'',smleYaIfInOctetsLo)),
SUM(DECODE(SIGN(smleYaIfInUnknownProtos), -1,'',smleYaIfInUnknownProtos)),
SUM(DECODE(SIGN(smleYaIfOutOctetsHi), -1,'',smleYaIfOutOctetsHi)),
SUM(DECODE(SIGN(smleYaIfOutOctetsLo), -1,'',smleYaIfOutOctetsLo)),
SUM(DECODE(SIGN(greenew), -1,'',greenew)),
SUM(DECODE(SIGN(redAttk),-1,'',redAttk)),
SUM(DECODE(SIGN(mannjRetrnO_00), -1,'',mannjRetrnO_00)),
SUM(DECODE(SIGN(mannjRetrnO_01), -1,'',mannjRetrnO_01)),
SUM(DECODE(SIGN(mannjqessew),-1,'',mannjqessew)),
SUM(DECODE(SIGN(mannjqessk), -1,'',mannjqessk)),
SUM(DECODE(SIGN(foolYaNordSawYasgs), -1,'',foolYaNordSawYasgs)),
SUM(DECODE(SIGN(foolYaNohmmedTcpdee), -1,'',foolYaNohmmedTcpdee)),
SUM(DECODE(SIGN(foolYaNoSentSawYasgs), -1,'',foolYaNoSentSawYasgs)),
SUM(DECODE(SIGN(galAttNonctIfhoPsIntew),-1,'',galAttNonctIfhoPsIntew)),
SUM(DECODE(SIGN(galAttNonctIfhoPsIntk), -1,'',galAttNonctIfhoPsIntk)),
SUM(DECODE(SIGN(galAttNonctIfhoPsStrk), -1,'',galAttNonctIfhoPsStrk)),
SUM(DECODE(SIGN(galFlNonloveIfhoFlRe_00), -1,'',galFlNonloveIfhoFlRe_00)),
SUM(DECODE(SIGN(galFlNonloveIfhoFlRe_01), -1,'',galFlNonloveIfhoFlRe_01)),
SUM(DECODE(SIGN(galFlNonloveIfhoFlRe_02), -1,'',galFlNonloveIfhoFlRe_02)),
SUM(DECODE(SIGN(galFlNonloveIfhoRevPsI_00), -1,'',galFlNonloveIfhoRevPsI_00)),
SUM(DECODE(SIGN(galFlNonloveIfhoRevPsIntk),-1,'',galFlNonloveIfhoRevPsIntk)),
SUM(DECODE(SIGN(galFlNonloveIfhoRevPsStrk),-1,'',galFlNonloveIfhoRevPsStrk)),
SUM(DECODE(SIGN(galqNonloveIfhoPsIntew),-1,'',galqNonloveIfhoPsIntew)),
SUM(DECODE(SIGN(galqNonctIfhoPsIntk),-1,'',galqNonctIfhoPsIntk)),
SUM(DECODE(SIGN(galqNonctIfhoPsStrk),-1,'',galqNonctIfhoPsStrk)),
SUM(DECODE(SIGN(MyYapptRejHwaschd), -1,'',MyYapptRejHwaschd)),
SUM(DECODE(SIGN(MyYaCtypptAttaschd),-1,'',MyYaCtypptAttaschd)),
SUM(DECODE(SIGN(MyYaCtypptAttkPds_00), -1,'',MyYaCtypptAttkPds_00)),
SUM(DECODE(SIGN(MyYaCtypptRejaschd),-1,'',MyYaCtypptRejaschd)),
SUM(DECODE(SIGN(MyYaCtypptRejkPds_00), -1,'',MyYaCtypptRejkPds_00)),
SUM(DECODE(SIGN(MyYaslesCtyaschd), -1,'',MyYaslesCtyaschd)),
SUM(DECODE(SIGN(MyYasCtyfrndjk), -1,'',MyYasCtyfrndjk)),
SUM(DECODE(SIGN(MyYamischd),-1,'',MyYamischd)),
SUM(DECODE(SIGN(MyYamityfrndjk), -1,'',MyYamityfrndjk)),
SUM(DECODE(SIGN(ladyCtypptAttServqad),-1,'',ladyCtypptAttServqad)),
SUM(DECODE(SIGN(ladyCtypptRejServqad),-1,'',ladyCtypptRejServqad)),
SUM(DECODE(SIGN(ladyNoActv10msItvlewTti10),-1,'',ladyNoActv10msItvlewTti10)),
SUM(DECODE(SIGN(YaNo),-1,'',YaNo)),
SUM(DECODE(SIGN(ladyNo1), -1,'',ladyNo1)),
SUM(DECODE(SIGN(ladyNo2), -1,'',ladyNo2)),
SUM(DECODE(SIGN(ladys), -1,'',ladys)),
SUM(DECODE(SIGN(lady00), -1,'',lady00)),
SUM(DECODE(SIGN(lady01), -1,'',lady01)),
SUM(DECODE(SIGN(ladySUM),-1,'',ladySUM)),
SUM(DECODE(SIGN(ladySUM00), -1,'',ladySUM00)),
SUM(DECODE(SIGN(ladySUM01), -1,'',ladySUM01)),
SUM(DECODE(SIGN(ladySUM),-1,'',ladySUM)),
SUM(DECODE(SIGN(NoYaAttLwhomannj), -1,'',NoYaAttLwhomannj)),
SUM(DECODE(SIGN(HiYaFlLwho), -1,'',HiYaFlLwho)),
SUM(DECODE(SIGN(HiYaFlLwho5), -1,'',HiYaFlLwho5)),
SUM(DECODE(SIGN(HiYaFlLwho500), -1,'',HiYaFlLwho500)),
SUM(DECODE(SIGN(HiYaFlLwho5), -1,'',HiYaFlLwho5)),
SUM(DECODE(SIGN(NoYaqLwhomannj), -1,'',NoYaqLwhomannj)),
SUM(DECODE(SIGN(gal6), -1,'',gal6)),
SUM(DECODE(SIGN(gal55), -1,'',gal55)),
SUM(DECODE(SIGN(gal4), -1,'',gal4)),
SUM(DECODE(SIGN(gal3), -1,'',gal3)),
SUM(DECODE(SIGN(galN1),-1,'',galN1)),
SUM(DECODE(SIGN(gal2), -1,'',gal2)),
SUM(DECODE(SIGN(Tool),-1,'',Tool)),
SUM(DECODE(SIGN(MyYaslehj), -1,'',MyYaslehj)),
SUM(DECODE(SIGN(aruhgDl),-1,'',aruhgDl)),
SUM(DECODE(SIGN(aruhgUl),-1,'',aruhgUl)),
SUM(DECODE(SIGN(MyYamigtumPqytr00), -1,'',MyYamigtumPqytr00)),
SUM(DECODE(SIGN(MyYamigtumPqytr01), -1,'',MyYamigtumPqytr01)),
SUM(DECODE(SIGN(MyYamigtumPqytr02), -1,'',MyYamigtumPqytr02)),
SUM(DECODE(SIGN(MyYamigtumPqytr03), -1,'',MyYamigtumPqytr03)),
SUM(DECODE(SIGN(MyYamigtumPqytr04), -1,'',MyYamigtumPqytr04)),
SUM(DECODE(SIGN(MyYamigtumPqytr05), -1,'',MyYamigtumPqytr05)),
SUM(DECODE(SIGN(MyYamigtumPqytr06), -1,'',MyYamigtumPqytr06)),
SUM(DECODE(SIGN(MyYamigtumPqytr07), -1,'',MyYamigtumPqytr07)),
SUM(DECODE(SIGN(MyYamigtumPqytr08), -1,'',MyYamigtumPqytr08)),
SUM(DECODE(SIGN(MyYamigtumPqytr09), -1,'',MyYamigtumPqytr09)),
SUM(DECODE(SIGN(MyYamigtumPqytr10), -1,'',MyYamigtumPqytr10)),
SUM(DECODE(SIGN(MyYamigtumPqytr11), -1,'',MyYamigtumPqytr11)),
SUM(DECODE(SIGN(MyYamigtumPqytr12), -1,'',MyYamigtumPqytr12)),
SUM(DECODE(SIGN(MyYamigtumPqytr13), -1,'',MyYamigtumPqytr13)),
SUM(DECODE(SIGN(MyYamigtumPqytr14), -1,'',MyYamigtumPqytr14)),
SUM(DECODE(SIGN(MyYamigtumPqytr15), -1,'',MyYamigtumPqytr15)),
SUM(DECODE(SIGN(MyYamii), -1,'',MyYamii)),
SUM(DECODE(SIGN(MyYamis), -1,'',MyYamis)),
SUM(DECODE(SIGN(MyYamie00),-1,'',MyYamie00)),
SUM(DECODE(SIGN(MyYamie01),-1,'',MyYamie01)),
SUM(DECODE(SIGN(MyYamie02),-1,'',MyYamie02)),
SUM(DECODE(SIGN(MyYamie03),-1,'',MyYamie03)),
SUM(DECODE(SIGN(MyYamie04),-1,'',MyYamie04)),
SUM(DECODE(SIGN(MyYamie05),-1,'',MyYamie05)),
SUM(DECODE(SIGN(MyYamie06),-1,'',MyYamie06)),
SUM(DECODE(SIGN(MyYamie07),-1,'',MyYamie07)),
SUM(DECODE(SIGN(MyYamie08),-1,'',MyYamie08)),
SUM(DECODE(SIGN(MyYamie09),-1,'',MyYamie09)),
SUM(DECODE(SIGN(MyYamie10),-1,'',MyYamie10)),
SUM(DECODE(SIGN(MyYamie11),-1,'',MyYamie11)),
SUM(DECODE(SIGN(MyYamie12),-1,'',MyYamie12)),
SUM(DECODE(SIGN(MyYamie13),-1,'',MyYamie13)),
SUM(DECODE(SIGN(MyYamie14),-1,'',MyYamie14)),
SUM(DECODE(SIGN(MyYamie15),-1,'',MyYamie15)),
SUM(DECODE(SIGN(MyYamij), -1,'',MyYamij)),
SUM(DECODE(SIGN(sacsledghDljk), -1,'',sacsledghDljk)),
SUM(DECODE(SIGN(Salmon),-1,'',Salmon)),
SUM(DECODE(SIGN(Alloy),-1,'',Alloy)),
SUM(DECODE(SIGN(Lemon),-1,'',Lemon)),
SUM(DECODE(SIGN(Dolph),-1,'',Dolph)),
SUM(DECODE(SIGN(Halw),-1,'',Halw)),
SUM(DECODE(SIGN(Coc),-1,'',Coc)),
SUM(DECODE(SIGN(Nut),-1,'',Nut)),
SUM(DECODE(SIGN(Smily),-1,'',Smily)),
SUM(DECODE(SIGN(Cosm),-1,'',Cosm)),
SUM(DECODE(SIGN(Loly),-1,'',Loly)),
SUM(DECODE(SIGN(Gold),-1,'',Gold)),
SUM(DECODE(SIGN(Silvy), -1,'',Silvy)),
SUM(DECODE(SIGN(Honey), -1,'',Honey))
FROM Value
GROUP by MSD
Also i got the below point from a site:
ORA-01467: sort key too long
Cause: A DISTINCT, GROUP BY, ORDER BY, or SET operation requires a sort key longer than that supported by Oracle. Either too many columns or too many group functions were specified in the SELECT statement.
Action: Reduce the number of columns or group functions involved in the operation.
However i am able to run the same query on a different table with almost double the number of columns.
Can anyone please help me in figuring out the actual cause of this error and the solution.
Thanks in advance,
Arun

Well, as I already mentioned, there is no way to fit GROUP BY columns and all non distinct data aggregates into a single Otacle block. So I suggest to replace GROUP BY with analytic functions. I tested it and it works. I can not fit whole statement, since forum message limit it 30000 characters, so I will remove some trailing select list expressions. They all follow same pattern anyway:
SELECT  DISTINCT MSD,
                 1,
                 SUM(FLAG) OVER(PARTITION BY MSD),
                 DECODE(SUM(FLAGCOLOR) OVER(PARTITION BY MSD),0,0,1),
                 SUM(DECODE(SIGN(Tiefool), -1,to_number(null),Tiefool)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(Tiegreen), -1,to_number(null),Tiegreen)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(TiesacTotaru), -1,to_number(null),TiesacTotaru)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(Tiesaccfaru), -1,to_number(null),Tiesaccfaru)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(Tiel), -1,to_number(null),Tiel)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(Tiemannj), -1,to_number(null),Tiemannj)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNo57), -1,to_number(null),HiYaNo57)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoAttOIRHoLad), -1,to_number(null),HiYaNoAttOIRHoLad)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoAttOIRHomannj), -1,to_number(null),HiYaNoAttOIRHomannj)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoAttOIRHosmrlone), -1,to_number(null),HiYaNoAttOIRHosmrlone)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoAttOSwHomannj), -1,to_number(null),HiYaNoAttOSwHomannj)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoFlOIRHoCs57jFlr),-1,to_number(null),HiYaNoFlOIRHoCs57jFlr)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoFlOIRHoCs57Re_00), -1,to_number(null),HiYaNoFlOIRHoCs57Re_00)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoFlOIRHoCs57Re_01), -1,to_number(null),HiYaNoFlOIRHoCs57Re_01)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoFlOIRHoCs57Ue_00), -1,to_number(null),HiYaNoFlOIRHoCs57Ue_00)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoFlOIRHoLadG_00), -1,to_number(null),HiYaNoFlOIRHoLadG_00)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoFlOIRHoLadR_00), -1,to_number(null),HiYaNoFlOIRHoLadR_00)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoFlOIRHoLadR_01), -1,to_number(null),HiYaNoFlOIRHoLadR_01)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoFlOIRHoLadU_00), -1,to_number(null),HiYaNoFlOIRHoLadU_00)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoFlOIRHomannj_00), -1,to_number(null),HiYaNoFlOIRHomannj_00)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoFlOIRHomannj_01), -1,to_number(null),HiYaNoFlOIRHomannj_01)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoFlOIRHomannj_02), -1,to_number(null),HiYaNoFlOIRHomannj_02)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoFlOIRHomannj_03), -1,to_number(null),HiYaNoFlOIRHomannj_03)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoFlOIRHosmr_00), -1,to_number(null),HiYaNoFlOIRHosmr_00)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoFlOIRHosmr_01), -1,to_number(null),HiYaNoFlOIRHosmr_01)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoFlOIRHosmr_02), -1,to_number(null),HiYaNoFlOIRHosmr_02)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoFlOIRHosmr_03), -1,to_number(null),HiYaNoFlOIRHosmr_03)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoFlOSwHomannj_00), -1,to_number(null),HiYaNoFlOSwHomannj_00)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoFlOSwHomannj_01), -1,to_number(null),HiYaNoFlOSwHomannj_01)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoFlOSwHomannj_02), -1,to_number(null),HiYaNoFlOSwHomannj_02)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoFlOSwHomannj_03), -1,to_number(null),HiYaNoFlOSwHomannj_03)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoOIRCckOldCh), -1,to_number(null),HiYaNoOIRCckOldCh)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoOIRCcq), -1,to_number(null),HiYaNoOIRCcq)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoOIRHocAl_00), -1,to_number(null),HiYaNoOIRHocAl_00)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoOIRHokOldC_00), -1,to_number(null),HiYaNoOIRHokOldC_00)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoOIRHokOldC_01), -1,to_number(null),HiYaNoOIRHokOldC_01)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoOIRHoq), -1,to_number(null),HiYaNoOIRHoq)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYatoyCs57), -1,to_number(null),HiYatoyCs57)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYatoyLad), -1,to_number(null),HiYatoyLad)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYatoymannj), -1,to_number(null),HiYatoymannj)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYatoysmrlone),-1,to_number(null),HiYatoysmrlone)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(HiYaNoplymannj), -1,to_number(null),HiYaNoplymannj)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(redAtt), -1,to_number(null),redAtt)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(NoYaNoOutIratHoAtt), -1,to_number(null),NoYaNoOutIratHoAtt)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(vavaYakcttntodef), -1,to_number(null),vavaYakcttntodef)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(vavaYakcttntoMan), -1,to_number(null),vavaYakcttntoMan)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(vavaYaNoddvac), -1,to_number(null),vavaYaNoddvac)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(vavaYaNordvac), -1,to_number(null),vavaYaNordvac)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(vavaYasalRlcTotPktThp), -1,to_number(null),vavaYasalRlcTotPktThp)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(vavaYasalRlccfPktThp),-1,to_number(null),vavaYasalRlccfPktThp)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(vavaYamilRlcTotPktThp), -1,to_number(null),vavaYamilRlcTotPktThp)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(vavaYamilRlccfPktThp), -1,to_number(null),vavaYamilRlccfPktThp)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoauwcupytr00),-1,to_number(null),MyYaNoauwcupytr00)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoauwcupytr01),-1,to_number(null),MyYaNoauwcupytr01)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoauwcupytr02),-1,to_number(null),MyYaNoauwcupytr02)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoauwcupytr03),-1,to_number(null),MyYaNoauwcupytr03)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoauwcupytr04),-1,to_number(null),MyYaNoauwcupytr04)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoauwcupytr05),-1,to_number(null),MyYaNoauwcupytr05)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoauwcupytr06),-1,to_number(null),MyYaNoauwcupytr06)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoauwcupytr07),-1,to_number(null),MyYaNoauwcupytr07)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoauwcupytr08),-1,to_number(null),MyYaNoauwcupytr08)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoauwcupytr09),-1,to_number(null),MyYaNoauwcupytr09)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoauwcupytr10),-1,to_number(null),MyYaNoauwcupytr10)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoauwcupytr11),-1,to_number(null),MyYaNoauwcupytr11)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoauwcupytr12),-1,to_number(null),MyYaNoauwcupytr12)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoauwcupytr13),-1,to_number(null),MyYaNoauwcupytr13)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoauwcupytr14),-1,to_number(null),MyYaNoauwcupytr14)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoauwcupytr15),-1,to_number(null),MyYaNoauwcupytr15)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoravmyfFra00),-1,to_number(null),MyYaNoravmyfFra00)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoravmyfFra01),-1,to_number(null),MyYaNoravmyfFra01)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoravmyfFra02),-1,to_number(null),MyYaNoravmyfFra02)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoravmyfFra03),-1,to_number(null),MyYaNoravmyfFra03)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoravmyfFra04),-1,to_number(null),MyYaNoravmyfFra04)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoravmyfFra05),-1,to_number(null),MyYaNoravmyfFra05)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoravmyfFra06),-1,to_number(null),MyYaNoravmyfFra06)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoravmyfFra07),-1,to_number(null),MyYaNoravmyfFra07)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoravmyfFra08),-1,to_number(null),MyYaNoravmyfFra08)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoravmyfFra09),-1,to_number(null),MyYaNoravmyfFra09)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoravmyfFra10),-1,to_number(null),MyYaNoravmyfFra10)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoravmyfFra11),-1,to_number(null),MyYaNoravmyfFra11)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoravmyfFra12),-1,to_number(null),MyYaNoravmyfFra12)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoravmyfFra13),-1,to_number(null),MyYaNoravmyfFra13)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoravmyfFra14),-1,to_number(null),MyYaNoravmyfFra14)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaNoravmyfFra15),-1,to_number(null),MyYaNoravmyfFra15)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigtumytr00), -1,to_number(null),MyYamigtumytr00)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigtumytr01), -1,to_number(null),MyYamigtumytr01)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigtumytr02), -1,to_number(null),MyYamigtumytr02)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigtumytr03), -1,to_number(null),MyYamigtumytr03)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigtumytr04), -1,to_number(null),MyYamigtumytr04)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigtumytr05), -1,to_number(null),MyYamigtumytr05)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigtumytr06), -1,to_number(null),MyYamigtumytr06)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigtumytr07), -1,to_number(null),MyYamigtumytr07)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigtumytr08), -1,to_number(null),MyYamigtumytr08)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigtumytr09), -1,to_number(null),MyYamigtumytr09)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigtumytr10), -1,to_number(null),MyYamigtumytr10)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigtumytr11), -1,to_number(null),MyYamigtumytr11)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigtumytr12), -1,to_number(null),MyYamigtumytr12)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigtumytr13), -1,to_number(null),MyYamigtumytr13)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigtumytr14), -1,to_number(null),MyYamigtumytr14)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigtumytr15), -1,to_number(null),MyYamigtumytr15)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMlolytr00), -1,to_number(null),MyYaSUMlolytr00)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMlolytr01), -1,to_number(null),MyYaSUMlolytr01)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMlolytr02), -1,to_number(null),MyYaSUMlolytr02)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMlolytr03), -1,to_number(null),MyYaSUMlolytr03)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMlolytr04), -1,to_number(null),MyYaSUMlolytr04)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMlolytr05), -1,to_number(null),MyYaSUMlolytr05)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMlolytr06), -1,to_number(null),MyYaSUMlolytr06)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMlolytr07), -1,to_number(null),MyYaSUMlolytr07)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMlolytr08), -1,to_number(null),MyYaSUMlolytr08)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMlolytr09), -1,to_number(null),MyYaSUMlolytr09)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMlolytr10), -1,to_number(null),MyYaSUMlolytr10)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMlolytr11), -1,to_number(null),MyYaSUMlolytr11)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMlolytr12), -1,to_number(null),MyYaSUMlolytr12)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMlolytr13), -1,to_number(null),MyYaSUMlolytr13)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMlolytr14), -1,to_number(null),MyYaSUMlolytr14)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMlolytr15), -1,to_number(null),MyYaSUMlolytr15)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMgrtytr00), -1,to_number(null),MyYaSUMgrtytr00)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMgrtytr01), -1,to_number(null),MyYaSUMgrtytr01)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMgrtytr02), -1,to_number(null),MyYaSUMgrtytr02)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMgrtytr03), -1,to_number(null),MyYaSUMgrtytr03)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMgrtytr04), -1,to_number(null),MyYaSUMgrtytr04)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMgrtytr05), -1,to_number(null),MyYaSUMgrtytr05)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMgrtytr06), -1,to_number(null),MyYaSUMgrtytr06)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMgrtytr07), -1,to_number(null),MyYaSUMgrtytr07)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMgrtytr08), -1,to_number(null),MyYaSUMgrtytr08)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMgrtytr09), -1,to_number(null),MyYaSUMgrtytr09)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMgrtytr10), -1,to_number(null),MyYaSUMgrtytr10)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMgrtytr11), -1,to_number(null),MyYaSUMgrtytr11)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMgrtytr12), -1,to_number(null),MyYaSUMgrtytr12)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMgrtytr13), -1,to_number(null),MyYaSUMgrtytr13)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMgrtytr14), -1,to_number(null),MyYaSUMgrtytr14)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMgrtytr15), -1,to_number(null),MyYaSUMgrtytr15)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigcfvw00),-1,to_number(null),MyYamigcfvw00)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigcfvw01),-1,to_number(null),MyYamigcfvw01)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigcfvw02),-1,to_number(null),MyYamigcfvw02)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigcfvw03),-1,to_number(null),MyYamigcfvw03)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigcfvw04),-1,to_number(null),MyYamigcfvw04)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigcfvw05),-1,to_number(null),MyYamigcfvw05)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigcfvw06),-1,to_number(null),MyYamigcfvw06)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigcfvw07),-1,to_number(null),MyYamigcfvw07)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigcfvw08),-1,to_number(null),MyYamigcfvw08)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigcfvw09),-1,to_number(null),MyYamigcfvw09)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigcfvw10),-1,to_number(null),MyYamigcfvw10)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigcfvw11),-1,to_number(null),MyYamigcfvw11)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigcfvw12),-1,to_number(null),MyYamigcfvw12)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigcfvw13),-1,to_number(null),MyYamigcfvw13)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigcfvw14),-1,to_number(null),MyYamigcfvw14)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamigcfvw15),-1,to_number(null),MyYamigcfvw15)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr00), -1,to_number(null),MyYaSUMNoOfcfsytr00)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr01), -1,to_number(null),MyYaSUMNoOfcfsytr01)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr02), -1,to_number(null),MyYaSUMNoOfcfsytr02)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr03), -1,to_number(null),MyYaSUMNoOfcfsytr03)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr04), -1,to_number(null),MyYaSUMNoOfcfsytr04)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr05), -1,to_number(null),MyYaSUMNoOfcfsytr05)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr06), -1,to_number(null),MyYaSUMNoOfcfsytr06)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr07), -1,to_number(null),MyYaSUMNoOfcfsytr07)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr08), -1,to_number(null),MyYaSUMNoOfcfsytr08)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr09), -1,to_number(null),MyYaSUMNoOfcfsytr09)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr10), -1,to_number(null),MyYaSUMNoOfcfsytr10)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr11), -1,to_number(null),MyYaSUMNoOfcfsytr11)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr12), -1,to_number(null),MyYaSUMNoOfcfsytr12)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr13), -1,to_number(null),MyYaSUMNoOfcfsytr13)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr14), -1,to_number(null),MyYaSUMNoOfcfsytr14)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYaSUMNoOfcfsytr15), -1,to_number(null),MyYaSUMNoOfcfsytr15)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamiiitum00),-1,to_number(null),MyYamiiitum00)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamiiitum01),-1,to_number(null),MyYamiiitum01)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamiiitum02),-1,to_number(null),MyYamiiitum02)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamiiitum03),-1,to_number(null),MyYamiiitum03)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamiiitum04),-1,to_number(null),MyYamiiitum04)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamiiitum05),-1,to_number(null),MyYamiiitum05)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamiiitum06),-1,to_number(null),MyYamiiitum06)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamiiitum07),-1,to_number(null),MyYamiiitum07)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamiiitum08),-1,to_number(null),MyYamiiitum08)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamiiitum09),-1,to_number(null),MyYamiiitum09)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamiiitum10),-1,to_number(null),MyYamiiitum10)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamiiitum11),-1,to_number(null),MyYamiiitum11)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamiiitum12),-1,to_number(null),MyYamiiitum12)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamiiitum13),-1,to_number(null),MyYamiiitum13)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamiiitum14),-1,to_number(null),MyYamiiitum14)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(MyYamiiitum15),-1,to_number(null),MyYamiiitum15)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(Cart),-1,to_number(null),Cart)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(Carg),-1,to_number(null),Carg)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(Carw), -1,to_number(null),Carw)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(Cars), -1,to_number(null),Cars)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(Carx),-1,to_number(null),Carx)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(Cara), -1,to_number(null),Cara)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(Carxs), -1,to_number(null),Carxs)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(Carq),-1,to_number(null),Carq)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(Carp),-1,to_number(null),Carp)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(Cark),-1,to_number(null),Cark)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(Carg), -1,to_number(null),Carg)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(Carn), -1,to_number(null),Carn)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(CarYgh), -1,to_number(null),CarYgh)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(Carty), -1,to_number(null),Carty)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(Carzx), -1,to_number(null),Carzx)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(asdef), -1,to_number(null),asdef)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(toyYaIncup), -1,to_number(null),toyYaIncup)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(toyYaInLostcup), -1,to_number(null),toyYaInLostcup)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(toyYaInOutOfwcup),-1,to_number(null),toyYaInOutOfwcup)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(toyYaOutcup), -1,to_number(null),toyYaOutcup)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(manYaNoddSdulk128), -1,to_number(null),manYaNoddSdulk128)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(manYaNoddSdulk256), -1,to_number(null),manYaNoddSdulk256)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(manYaNoddSdulk64), -1,to_number(null),manYaNoddSdulk64)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(fudYaDlfd12PsStrMwm128),-1,to_number(null),fudYaDlfd12PsStrMwm128)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(fudYaDlfd12PsStrMwm256),-1,to_number(null),fudYaDlfd12PsStrMwm256)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(fudYaDlfd12PsStrMwms64),-1,to_number(null),fudYaDlfd12PsStrMwms64)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(fudYaMwmsghCongTo), -1,to_number(null),fudYaMwmsghCongTo)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(fudYaMwmscttntodef), -1,to_number(null),fudYaMwmscttntodef)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(fudYaMwmscttntoMan), -1,to_number(null),fudYaMwmscttntoMan)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(fudYaNoamMwms09),-1,to_number(null),fudYaNoamMwms09)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(fudYaNoFldMwmsSesLackRnRe),-1,to_number(null),fudYaNoFldMwmsSesLackRnRe)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(fudYaNoFldMwmsSesLackTnRe),-1,to_number(null),fudYaNoFldMwmsSesLackTnRe)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(fudYaNoqessMwms09),-1,to_number(null),fudYaNoqessMwms09)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(fudYaNoqMwmsSesrr), -1,to_number(null),fudYaNoqMwmsSesrr)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(fudYaNoteMwmsSesStop), -1,to_number(null),fudYaNoteMwmsSesStop)) OVER(PARTITION BY MSD),
                 SUM(DECODE(SIGN(fudYaslesMwmslg), -1,to_number(null),fudYaslesMwmslg)) OVER(PARTITION BY MSD)
  FROM  Value
/SY.

Similar Messages

  • Error ORA-01467: sort key too long

    Hi. I have just come across the error ORA-01467: sort key too long .
    In the Oracle documentation, the 2 line
    description of this error basically says that there may be too many columns
    or group functions in the query, so I need to reduce the number of columns
    in the query.
    Here's the problem. The documentation does not say how many the limit is.
    The query is quite complex, I suppose, but I don't see why it should be a
    problem. In a nutshell, the main table has 3 text fields (which are the
    index) and 154 floats. The query joins one of the text fields to another
    table to get a lookup value and selects this out, along with the other two
    text fields and the SUM of the numeric fields. The query groups by the two
    text fields and the lookup.
    I guess I saw this when I was using MS SQL Server 6.5 and tried to sum more
    than 125 columns, but that went away in SQL Server 7. I am using Oracle 8
    at this point but need to support Oracle 7, too.
    I guess what I am looking for (at least) is the maximum number of columns
    that can be in a grouping/summing query. I'd also like to know if this can
    be worked around by changing a setting on the server, something to set the
    maximum number of sums to 1000, perhaps? I am fine with working around this
    in my software if I need to, as I have done previously (I took the first 125
    sums into a temp table, then the next 125, etc. and joined the resulting
    tables to get my results), but would really like to get a workaround that
    was server-based, if possible.
    Thanks for your help!
    null

    Hi. I have just come across the error ORA-01467: sort key too long .
    In the Oracle documentation, the 2 line
    description of this error basically says that there may be too many columns
    or group functions in the query, so I need to reduce the number of columns
    in the query.
    Here's the problem. The documentation does not say how many the limit is.
    The query is quite complex, I suppose, but I don't see why it should be a
    problem. In a nutshell, the main table has 3 text fields (which are the
    index) and 154 floats. The query joins one of the text fields to another
    table to get a lookup value and selects this out, along with the other two
    text fields and the SUM of the numeric fields. The query groups by the two
    text fields and the lookup.
    I guess I saw this when I was using MS SQL Server 6.5 and tried to sum more
    than 125 columns, but that went away in SQL Server 7. I am using Oracle 8
    at this point but need to support Oracle 7, too.
    I guess what I am looking for (at least) is the maximum number of columns
    that can be in a grouping/summing query. I'd also like to know if this can
    be worked around by changing a setting on the server, something to set the
    maximum number of sums to 1000, perhaps? I am fine with working around this
    in my software if I need to, as I have done previously (I took the first 125
    sums into a temp table, then the next 125, etc. and joined the resulting
    tables to get my results), but would really like to get a workaround that
    was server-based, if possible.
    Thanks for your help!
    null

  • ORA-01467: Sort key too long error.

    Dear All,
    I have a complex query having lot of joins. It is working fine.
    I just added few functions to it i.e. now few fields are calculated using functions.
    Now it start giving error: ORA-01467: Sort key too long error.
    What may be the problem?
    Please help.
    -Sameer

    ORA-01467 sort key too long
    Cause: A DISTINCT, GROUP BY, ORDER BY, or SET operation requires a sort key longer than that supported by Oracle. Either too many columns or too many group functions were specified in the SELECT statement.
    Action: Reduce the number of columns or group functions involved in the operation.

  • 'sort key too long error' while trying to use dynamic sql

    Hi All,
    I have been trying to generate an interactive report using a dynamically generated SQL query.. for this I have
    1) Created a application process that returns the dynamically generated SELECT statement
    2) Create a process in the page which creates a collection based on the SELECT statement returned by the application process
    3) An interactive report that selects ALL (SELECT * ....) from that particular collection.
    On implementing I am getting the 'ORA-01467: sort key too long' error.
    On checking this out online I realized that one has to change the Block size of the database to get past this error, but in order to do that I would have to re-create the database, create a backup of the data and then re enter them into the new database which would be a nightmare.
    I would like to know if there is any work around to this....
    CODE IN THE APPLICATION PROCESS
    DECLARE
    q VARCHAR2(1000);
    BEGIN
    IF :P124_COUNTRY - :P124_WORK_GROUP - :P124_PRODUCT - :P124_ROLE = 1 THEN
    q:= 'SELECT VISA_COUNTRY AS "Country", ROUND(((COUNT(VISA_ID)/(SELECT COUNT(ROW_ID) FROM PSA_RESOURCE_MANAGER WHERE ACTIVE_FLAG = ''Y''))*100),2) || ''%'' AS "Travel Readiness %" FROM PSA_VISA_INFO WHERE ACTIVE_FLAG = ''Y'' AND VISA_ACTIVE_FLAG = ''Y'' GROUP BY VISA_COUNTRY';
    END IF;
    return q;
    END;
    CODE IN THE PROCESS THAT CREATES THE COLLECTION:
    APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY_B(
    p_collection_name => 'TRAVRED_TEST',
    p_query => 'application_process=set_query' );
    CODE IN THE INTERACTIVE REPORT:
    Select *
    From apex_collections
    Where collection_name = 'TRAVRED_TEST';
    I also tried selecting just 'c001, c002' etc which gave me a 'no data found' output. The query work fine when I ran it in the SQL Workshop
    Please help!
    Thanks in advance :)

    Hey Ben,
    I am getting the same error when I used the following code in the app process....
    DECLARE
    q VARCHAR2(32767);
    BEGIN
    IF :P124_COUNTRY - :P124_WORK_GROUP - :P124_PRODUCT - :P124_ROLE = 1 THEN
    q:= 'SELECT visa_country,
    COUNT(visa_id) visa_count
    FROM psa_visa_info
    WHERE active_flag = 'Y'
    AND visa_active_flag = 'Y'
    GROUP BY visa_country),
    row_id_count AS
    (SELECT /*+ MATERIALIZE */
    COUNT(ROW_ID) row_count
    FROM PSA_RESOURCE_MANAGER
    WHERE ACTIVE_FLAG = 'Y')
    SELECT visa_country,
    ROUND(visa_count/(SELECT row_count FROM row_id_count)*100,2) travel_readiness FROM PSA_VISA_INFO WHERE ACTIVE_FLAG = ''Y'' AND VISA_ACTIVE_FLAG = ''Y'' GROUP BY VISA_COUNTRY';
    END IF;
    return q;
    END;
    Thanks

  • Sort key too long error  depends on values supplied to query

    Please have a look at this query (Just given for guessing complications).
    This query works and gives output for pro_id=1 and other few values.
    But it fails for value 2.
    SELECT *
    FROM common_list_view_test
    WHERE che_id != 14
    AND(use_id = 299 OR iss_rec = 299 OR che_id IN
      (SELECT a.m_che_id
       FROM m_chk_pt a,    m_role_chk_pt b,    m_user c
       WHERE a.m_che_id = b.m_che_id
       AND b.m_rol_id = c.m_rol_id
       AND c.m_use_id = 299))
    AND pro_id = 2
    ORDER BY iss_dat,
      issue_stringFor pro_id = 2 it gives error:
    ORA-01467: sort key too long
    What do we mean by sort key?
    Is it depends on supplied information and the records to be fetched.
    If the query is going to fetch a lot of records then do this error occur?
    How to avoid this error and make the query to work got pro_id=2.
    -Sameer

    It is also not working for:
    SELECT COUNT(*)
    FROM common_list_view_test
    WHERE pro_id = 2Please tell me what i have to do?
    I can't rewrite common_list_view_test as i do not have enough priviledged to change its code, but this view is a lot complicated.
    But then why it works for one value and not for another one?
    Please help.
    -Sameer

  • Sort key too long - maximum number of columns in select statement

    the sort key too long is caused by either too many group
    functions or too many columns selected. Does anyone know the
    maximum number of columns that can be selected in one statement ?

    The Oracle 9i reference states ...
    The GROUP BY expression and all of the
    nondistinct aggregates functions (for example,
    SUM, AVG) must fit within a single database
    block.
    ... and the Oracle 9i SQL Reference states that ...
    An order_by_clause can contain no more than 255
    expressions.
    You could check your own documentation, but i think it will
    be the same.

  • Sort key too long message from view

    has anyone come accross the message "sort key too long" when
    selecting from a view, and if so what causes it ?

    It is also not working for:
    SELECT COUNT(*)
    FROM common_list_view_test
    WHERE pro_id = 2Please tell me what i have to do?
    I can't rewrite common_list_view_test as i do not have enough priviledged to change its code, but this view is a lot complicated.
    But then why it works for one value and not for another one?
    Please help.
    -Sameer

  • Sort key too long error

    Hi,
    I have a query which is customizable by the user based on changes to a table. They recently added 12 more double-precision columns to the table, giving them a total of 353 number columns and 32 varchar2 columns.
    The query needs to summarize these records into another table. Before adding the 12 new columns it worked fine. Now we get the oracle sort key too long error.
    Basically, the query looks like this:
    insert into MyTable(txtField1,txtField2,..,txtField32,numField1,numField2, ..,numField353)
    select txtfield1,txtfield2,..,txtfield32, SUM(numfield1),SUM(numfield2), .., SUM(numfield353)
    from MyOldTable
    where txtField1='somevalue' and txtField2='some other value'
    group by txtField1,txtField2,..,txtFieldn;
    I have tried increasing the sort_area_size parameter and it doesn't make a difference. What else can/should I change in order to get this query working again? As I said, this worked when there were only 341 sum columns.
    Thanks for any information you may provide.
    Thanks,
    Rob

    The sort key in Oracle is retricted to a length of one database block less some overhead. The only way to get the query to work is to increase your db_block_size parameter. Unfortunately, this will require rebuilding your database from scratch.
    In 9i, you can have different block sizes for different tablespaces. If you are running in 9i, you may be able to move the affected tables to a tablespace with a larger block size, and then do the query. I am not sure which block size would be used for the sort key in 9i, the "database" block size or the "tablespace" block size.
    Alternatively, you could look at the design of the table to see if you could split it up into several narrower tables, and use views to get the reporting.
    HTH
    John

  • ORA-01704: string literal too long (URGENT)

    Folks,
    I get error - ORA-01704: string literal too long,
    when trying to insert a value >4k into the SDIDOC column of the table below:
    CREATE TABLE "B1"."SDI_XML_TAB"
    ( "SDIID" VARCHAR2(60 BYTE) NOT NULL ENABLE,
    "SDIDOC" "SYS"."XMLTYPE" ,
    CONSTRAINT "SDI_XML_TAB_PK" PRIMARY KEY ("SDIID")
    USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "B1SYSTEM" ENABLE
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "B1SYSTEM"
    XMLTYPE COLUMN "SDIDOC" STORE AS CLOB (
    TABLESPACE "B1SYSTEM" ENABLE STORAGE IN ROW CHUNK 16384 PCTVERSION 10
    NOCACHE LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)) ;
    The SQL I used using OCI was:
    "INSERT INTO SDI_XML_TAB(SDIID,SDIDOC) VALUES('ABC','clobVal')"
    What am I doing wrong?
    P.S. I also used the following and it gives the same error:
    "INSERT INTO SDI_XML_TAB(SDIID,SDIDOC) VALUES('ABC',XMLType('clobVal'))"
    Thanks,
    Arthur
    Message was edited by:
    ArthurJohnson

    Check this cool-bi.com

  • [ORA-01704: string literal too long] in a long xquery

    I get an error when using queries with xmlquery.
    If the quoted string part is longest than 4000 chr then I get
    ORA-01704: string literal too long.
    Example...
    select xmlquery(
    ' <Root >
         {for $xxx in ora:view("ttttttt")
            let $nnn := $xxx/ROW/nnn/number()
    [total chr>4000] '
    RETURNING CONTENT)
    from dual
    Is it really not possible to write Oracle xmlqueries longest than 4000chr or there's a workaround for it?

    I got similary problem using the OCCI to insert record in my table.
    I have a BLOB field in my table and whenever I quote an HEX string that is bigger than 4000 chars I get the error: ORA-01704: string literal too long
    To sort that problem I have to pass to the prepared SQL statement, but now I got a new problem for which I do not have solution.
    I write here the piece of C++ code to insert and the error I get hoping somebody can help me.
    I have problem to write into a Blob object.
    I get the error: ORA-22275: Invalid LOB Locator Specified.
    The error occurs when I try to write into the blob variable:
    blobField.writeChunk(....
    Routine:
    void insert2 (void) throw (SQLException)
    cout << "=== Prepare Statement ===" << endl;
    Statement* stmtIns = occiConn->createStatement("insert into test_tab values (:1,:2,:3,:4,:5)");
    cout << "=== Prepare the Blob data ===" << endl;
    // Prepare all Blobs in an array of char.
    char* data[5];
    ub2 dataLen[5];
    int i;
    for (i = 0; i < 5; i++)
    data[i] = new char[16364];
    memset(data, 65+i, 16364);
    dataLen[i] = 16364;
    cout << "=== Assign the other fields ===" << endl;
    stmtIns->setInt(1, i + 10);
    stmtIns->setInt(2, i + 1000);
    stmtIns->setInt(3, i + 10000);
    stmtIns->setInt(4, i + 20);
    // Assign the blob field
    Blob blobField(occiConn);
    blobField.setEmpty();
    cout << "=== Opening the blob field in read/write mode ===" << endl;
    blobField.open(OCCI_LOB_READWRITE);
    cout << "=== Writing data into the blob ===" << endl;
    blobField.writeChunk(dataLen[0], reinterpret_cast<unsigned char*>(data[0]), dataLen[0], 1);
    blobField.close();
    cout << "=== Done ===" << endl;
    stmtIns->setBlob(5, blobField);
    cout << "=== Execute the iteration ===" << endl;
    stmtIns->executeUpdate();
    for (i = 0; i < 5; i++)
    delete [] data[i];
    stmtIns->executeUpdate("COMMIT");
    occiConn->terminateStatement(stmtIns);

  • Using clobs and ORA-01704: string literal too long

    Hi,
    I am attempting to add oracle support to an existing J2ee application. The issue I am facing is the use of CLOB datatypes and the 4k string literal limitation that Oracle has.
    I have dowloaded the 10.2.0.3 thin driver and am connected to a 9i release 2 database. When I execute a statement such as the following (say the table has one varchar2 field and two clob fields
    Insert into my_table VALUES ('hi','something','pretend this string is 5000 characters')
    I still receive the error
    java.sql.SQLException: ORA-01704: string literal too long
    I have read that the version 10 drivers were supposed to address this limitation. Is there something I am missing or must I change my home grown database layer to use bind variables or clob manipulation in a separate update/insert statement.? I am trying to avoid this situation since the database layer works fine for the situation of MSSQL and text fields which have no such limitation.
    Any advice you have here is greatly appreciated.
    Thanks,
    Joe

    Hi,
    I am attempting to add oracle support to an existing J2ee application. The issue I am facing is the use of CLOB datatypes and the 4k string literal limitation that Oracle has.
    I have dowloaded the 10.2.0.3 thin driver and am connected to a 9i release 2 database. When I execute a statement such as the following (say the table has one varchar2 field and two clob fields
    Insert into my_table VALUES ('hi','something','pretend this string is 5000 characters')
    I still receive the error
    java.sql.SQLException: ORA-01704: string literal too long
    I have read that the version 10 drivers were supposed to address this limitation. Is there something I am missing or must I change my home grown database layer to use bind variables or clob manipulation in a separate update/insert statement.? I am trying to avoid this situation since the database layer works fine for the situation of MSSQL and text fields which have no such limitation.
    Any advice you have here is greatly appreciated.
    Thanks,
    Joe

  • PL-SQL-ORA-01704 - String literal too long

    Hello guyz;
    I am trying to store a value of over 4000 character long in a CLOB column and I got the error message that says "PL-SQL-ORA-01704 - String literal too long".
    What can I do to overcome this challenge?
    Thanking you for your usual support.

    sb92075 wrote:
    Problem Exists Between Keyboard And Chair
    We can't say what you are doing wrong since we don't know specifically what you actually do.Okay let me put it down this way.
    I have an application using SQL Server as d backend engine & now, the user wants to migrate to Oracle. I now wrote a mini-program to create a schema/user in oracle with the schema/database (being used by the app) from SQL server. I verified the structure very well & every is just fine. Now, data migration (from SQL Server to Oracle).
    I was able to move most tables data successfully without issue until I attempted to load a table which has a column (in SQL defined as text with over 4000 (var)chars/CLOB in Oracle). On moving a particular row to oracle db (after few rows have already been INSERTed into this particular table x), I got that err msg.
    After battling with that for a while, I concluded to make d (DataMigrator) app take just d first 4000 string - only if the value in that field value length > 4000. This worked perfectly without issue but you know the implication - Data lost.
    Do I need to switch something on/off in Oracle that expands the CLOB default maximum field size? Because I foresee this happening as soon as the application (that would now sit on Oracle) is now in use.
    If you still don't understand this, I don't know how beta 2 explain this!
    Edited by: aweklin on Mar 17, 2013 8:25 AM
    Edited by: aweklin on Mar 17, 2013 8:25 AM
    Edited by: aweklin on Mar 17, 2013 8:27 AM
    Edited by: aweklin on Mar 17, 2013 8:27 AM

  • "ORA-01704: string literal too long" in Oracle 10g

    I would like to explain my problem with an example, let's create the following table:
    CREATE TABLE longtest
    (text LONG);
    I have to insert lots of data into this table and when I run this command:
    INSERT INTO LONGTEST VALUES ('aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    ..................more than 4000 characters..................
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa');
    I get the following error:
    ORA-01704: string literal too long
    To workaround this, I used bind variables, like this:
    BEGIN
    EXECUTE IMMEDIATE 'INSERT INTO LONGTEST VALUES (:a) '
    using
    'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    ..............(repeat more than 32768 characters)..............
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
    COMMIT;
    END;
    This worked fine with Oracle 9.2.0.4 but when I do the same thing
    in Oracle 10.2.0.2 there is a 32768 characters limit.
    I am planning to upgrade the database but I need a workaround for
    this, anyone knows why Oracle behaves differently in 10g??

    So, I wonder if anyone can explain why the following code works fine in Oracle 9.2.0.4 but not in Oracle 10.2.0.2:
    CREATE TABLE longtest
    (text LONG);
    BEGIN
    EXECUTE IMMEDIATE 'INSERT INTO LONGTEST VALUES (:a) '
    using
    'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    ..............(repeat more than 32768 characters)..............
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
    aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa';
    COMMIT;
    END;
    Regards,
    Cassiano

  • Limitation for CLOB columns? - ORA-01704: string literal too long

    Hello!
    I'm trying to update a CLOB column with more than 35000 characteres, but I get "ORA-01704: string literal too long".
    The code:
    declare
    l_clob clob;
    begin
    update test set test = empty_clob()
    WHERE ID = 1
    returning test into l_clob;
    dbms_lob.write( l_clob, length('A...here 35000xA...A'), 1,'A...here 35000xA...A');
    end;
    Is there any limitation for CLOB columns?
    Thanks for help.
    Daniel

    user605489 wrote:
    32768 characteres :)Actually it's 1 character less than 32K...
    *32767*
    SQL> declare
      2    v_vc varchar2(32768);
      3  begin
      4    null;
      5  end;
      6  /
      v_vc varchar2(32768);
    ERROR at line 2:
    ORA-06550: line 2, column 17:
    PLS-00215: String length constraints must be in range (1 .. 32767)
    SQL>I guess it comes from a legacy thing where signed words (2 bytes) are/were used to represent a value. As the most significant bit of the word is used to represent the sign of the number the range goes from -32768 to 32767.

  • SQL Error: ORA-01704: string literal too long

    select * from table(fn_split('some 10000 characters with comma separation .........................'))
    Error report:
    SQL Error: ORA-01704: string literal too long
    01704. 00000 - "string literal too long"
    *Cause:    The string literal is longer than 4000 characters.
    *Action:   Use a string literal of at most 4000 characters.
    how to pass my 10k record string

    933663 wrote:
    The string is through a user interface.So, that interface is using what datatype for the string? What language is the interface written in?
    insert into table
    select * from table(fn_split('2,4,2,5,7'));Do you understand what a string literal is? You cannot provide a varchar2 string that exceeds 4000 bytes from within SQL. Fact. It just cannot be done.
    If you are passing the string from a user interface using a datatype that supports more than 4000 bytes, and you pass it directly to PL/SQL code by calling the function or procedure directly (not using SQL) then you can use up to 32767 bytes for your VARCHAR2.
    The code you've posted (which happens to be some of my own code posted years ago on these forums) takes a VARCHAR2 as an input. You would have to change that to accept a CLOB datatype and work on the CLOB instead. However, you still wouldn't be able to pass in a string literal of more than 4000 bytes from SQL for it.
    Looking at your other thread: Seperate the string value
    ... it looks like the 'user' is trying to pass in a table definition. What is it your application is trying to do? Surely you are not trying to create a table at run time?
    So explain, what is the business issue you are trying to solve? We may be able to provide a better way of doing it.

Maybe you are looking for

  • Selection Criteria addition-Not working

    Hi! I have this report wherein I need to add two fields VBAP-Kunnr and knvv-konda in the selection screen so that I can do my drill down or search criteria based upon these two selections also apart from the existing ones, but unfortunately I am unab

  • Period account closing bal includes cumul movements, even with a rule.WHY?!

    Hello chaps, I've been struggling with this for a few days now and I'm going to have admit defeat. :( I'm trying to do two things. 1. View periodic balance sheet movements 2. Get the correct custom closing balance to roll up once I've done 1 (in Peri

  • Sales order creation with bapi in webdynpro

    When i use table control to update the line items only first row is getting updated in the sale order creation and the loop is not updating the other row to header only the first row is getting saved, for the same set of  data sale order is getting c

  • Very slow wirelesss when using iPhone 4S' personal hotspot for a MacBook Pro (MBP)...

    Hello. Last night, I was helping a client with his old iPhone 4S' personal hotspot as shown in http://support.apple.com/en-us/HT4517 web page. It uses Verizon Wireless 3G for his 4 GB data cellular connection. We got the wireless (WPA2) connection to

  • Possible to delete all strokes?

    Hello community, I received a file from an architect, which basically means they just exported from their program to illustrator. Now there are tons of unneccesary strokes in this file, is there a way to keep only the fill areas and delete all stroke