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

Similar Messages

  • 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.

  • 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.

  • 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 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

    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

  • 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.

  • 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

  • How to handle the SQL Error: ORA-01704: string literal too long

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta name="generator" content="HTML Tidy for Java (vers. 26 Sep 2004), see www.w3.org">
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta content="MSHTML 6.00.2900.2963" name="GENERATOR">
    </head>
    <body class="BodyContent">
    HI please chek the query getting error like string literal too long update PRVDR_ENRLMNT_AGREEMENT B set b.terms=q'#
    <div class="widget-title">
    <h5>Medical Assistance Provider Enrollment & Trading Partner Agreement - Conditions:</h5>
    <a href="# class="btn-minimize pull-right"></a></div>
    <div class="widget-content">
    <table width="100%" border="0">
    <tbody>
    <tr valign="center">
    <td class="Label" align="left" width="14%" colspan="2" height="32">In applying for enrollment as a provider or trading partner in the Medical Assistance Program (and programs for which the Michigan Department of Community Health (MDCH) is the fiscal intermediary), I represent and certify as follows:</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>1.</b></td>
    <td class="LabelValue" valign="top" align="left" height="32">The applicant, and the employer (if applicable), certify that the undersigned has/have the authority to execute this Agreement.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>2.</b></td>
    <td class="LabelValue" valign="top" align="left" height="32">Enrollment in the Medical Assistance Program does not guarantee participation in MDCH managed care programs nor does it replace or negate the contract process between a managed care entity and its providers or subcontractors.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>3.</b></td>
    <td class="LabelValue" valign="top" align="left" height="32">All information furnished on this Medical Assistance Provider Enrollment & Trading Partner Agreement form is true and complete.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>4.</b></td>
    <td class="LabelValue" valign="top" align="left" height="32">The providers and fiscal agents of ownership and control information agree to provide proper disclosure of provider's owners and other persons criminal related to Medicare, Medicaid or Title XX involvement. [42 CFR 455.100]</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>5.</b></td>
    <td class="LabelValue" align="left" height="32">The applicant and the employer agree to provide proper disclosure of any criminal convictions related to Medicare (Title XVIII), Medicaid (Title XIX), and other State Health Care Programs (Title V, Title XX, and Title XXI) involvement. [42 CFR 455.106 and 42 U.S.C. ? 1320a-7]</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>6.</b></td>
    <td class="LabelValue" align="left" height="32">I agree to read the Medicaid Provider Manual from the Michigan Department of Community Health (MDCH). I also agree to comply with 1) the terms and conditions of participation noted in the manual, and 2) MDCH's policies and procedures for the Medical Assistance Program contained in the manual, provider bulletins and other program notifications.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>7.</b></td>
    <td class="LabelValue" align="left" height="32">I agree to comply with the provisions of 42 CFR 455.104, 42 CFR 455.105, 42 CFR 431.107 and Act No. 280 of the Public Acts of 1939, as amended, which state the conditions and requirements under which participation in the Medical Assistance Program is allowed.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>8.</b></td>
    <td class="LabelValue" align="left" height="32">I agree to comply with the requirements of Section 6032 of the Deficit Reduction Act of 2005, codified at section 1902 (a)(68) of the Social Security Act which relates to the conditions and requirements of "Employee Education About False Claims Recovery."</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>9.</b></td>
    <td class="LabelValue" align="left" height="32">I agree that, upon request and at a reasonable time and place, I will allow authorized state or federal government agents to inspect, copy, and/or take any records I maintain pertaining to the delivery of goods and services to, or on behalf of, a Medical Assistance Program beneficiary. These records also include any service contract(s) I have with any billing agent/service or service bureau, billing consultant, or other healthcare provider.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>10.</b></td>
    <td class="LabelValue" align="left" height="32">I agree to include a clause in any contract I enter into which allows authorized state or federal government agents access to the subcontractor's accounting records and other documents needed to verify the nature and extent of costs and services furnished under the contract.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>11.</b></td>
    <td class="LabelValue" align="left" height="32">I understand that the incentive payment requested using my National Provider Identifier (NPI) number will be made directly to the Tax ID Number (TIN) that was indicated during the registration process.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>12.</b></td>
    <td class="LabelValue" align="left" height="32">I am not currently suspended, terminated, or excluded from the Medical Assistance Program by any state or by the U.S. Department of Health and Human Services.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>13.</b></td>
    <td class="LabelValue" align="left" height="32">I agree to comply with all policies and procedures of the Medical Assistance Program. I also agree that all disputes, including overpayments, may be adjudicated in administrative proceedings convened under Act No. 280 of the Public Acts of 1939, as amended, or in a court of competent jurisdiction. I further agree to reimburse the Medical Assistance Program for all overpayments, and I acknowledge that the Medicaid Audit System, which uses random sampling, is a reliable and acceptable method for determining such overpayments.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>14.</b></td>
    <td class="LabelValue" align="left" height="32">I agree to comply with the privacy and confidentiality provisions of any applicable laws governing the use and disclosure of protected health information, including the privacy regulations adopted by the U.S. Department of Health and Human Services under the Health Insurance Portability and Accountability Act of 1996 (HIPAA), and Public Acts 104-191 (45 CFR Parts 160 and 164, Subparts A and E). I also agree to comply with the HIPAA security regulations, as applicable, for electronic protected health information by the compliance date, which is currently April 21, 2005 (45 CFR Parts 160 and 164, Subparts A and C).</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>15.</b></td>
    <td class="LabelValue" align="left" height="32">This Agreement shall be governed by the laws of the State of Michigan and applicable federal law including, but not limited to, the Health Insurance Portability and Accountability Act of 1996 (HIPAA).</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>16.</b></td>
    <td class="LabelValue" align="left" height="32">The provisions of this Agreement are severable. If any provision is held or declared to be illegal, invalid or unenforceable, the remainder of the Agreement will continue in full force and effect as though the illegal, invalid or unenforceable provision had not been contained in this Agreement.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>17.</b></td>
    <td class="LabelValue" align="left" height="32">Failure or delay on the part of either party to exercise any right, power, privilege, or remedy in this Agreement will not constitute a waiver. No provision of this Agreement may be waived by either party except in writing and signed by an authorized representative of the party requesting the waiver.</td>
    </tr>
    <tr valign="center">
    <td class="Label" align="left" width="14%" colspan="2" height="32"></td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>18.</b></td>
    <td class="LabelValue" align="left" height="32">If the nursing facility named on the Medical Assistance Provider Enrollment & Trading Partner Agreement is sold, the seller will notify MDCH of the sale at least ninety (90) days prior to the expected sale date. Further, it is understood that the sale will not be recognized for reimbursement purposes under the Medical Assistance Program until ninety (90) days after such notification. Provisions of 42 CFR 413.135(f) will be retrospectively satisfied at that time. Any exception must be approved in writing by MDCH. The new owner/provider must receive Medicare certification for all Medicaid-only beds in the facility within one year from the date of purchase of an operating nursing facility or from the date of reopening a previously closed nursing facility.</td>
    </tr>
    <tr valign="center">
    <td class="Label" align="middle" width="14%" colspan="2" height="32">Medical Assistance Provider - Employer/Employee Conditions</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>19.</b></td>
    <td class="LabelValue" align="left" height="32">The applicant is employed by the business listed, now referred to as the "employer", to provide Medical Assistance Program services to eligible beneficiaries at the service address listed.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>20.</b></td>
    <td class="LabelValue" valign="top" align="left" height="32">The employer and the applicant shall advise MDCH within thirty (30) days after any change(s) in the employment relationship.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>21.</b></td>
    <td class="LabelValue" align="left" height="32">The employer and the applicant agree to be jointly and severally liable for any overpayments billed and paid under Act No. 280 of the Public Acts of 1939, as amended, for services provided by the applicant to eligible beneficiaries.</td>
    </tr>
    <tr valign="center">
    <td class="Label" align="middle" width="14%" colspan="2" height="32">Trading Partner Provisions</td>
    </tr>
    <tr valign="center">
    <td class="Label" align="left" width="14%" colspan="2" height="32">The MDCH and its Trading Partner desire to facilitate the exchange of healthcare transactions ("Transactions") by electronically transmitting and receiving data in agreed formats in substitution for conventional paper-based documents.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>1.</b></td>
    <td class="LabelValue" align="left" height="32">Companion Documents; Standards; Other Documentation. MDCH makes available certain inbound and outbound Electronic Data Interchange (EDI) transaction sets/formats and associated version. From time to time during the term of this Agreement, MDCH may modify supported transaction sets/formats. In submitting Transactions to MDCH, the Trading Partner agrees to conform to MDCH-issued provider publications and MDCH Companion Guides as amended from time to time. The MDCH Companion Guides, incorporated by reference herein, contain specific instructions for conducting each Transaction and as such supplement Implementation Guides issued under the Standards for Electronic Transactions mandated by the Health Insurance Portability and Accountability Act of 1996 (HIPAA) as amended. The MDCH Companion Guides are not intended to be complete billing instructions and do not alter or replace applicable physician guides or other healthcare provider billing publications issued by MDCH or by other third party payers. The Trading Partner agrees to comply with the requirements set forth in the applicable MDCH Companion Guides. The Trading Partner, or its vendor, or other authorized technical representative responsible for EDI software will document Trading Partner Information, data formats and related versions, trading partner identifiers, and other information MDCH requires to receive and transmit specific Transactions supported by MDCH.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>2.</b></td>
    <td class="LabelValue" align="left" height="32">Support.<br>
    As to software, equipment, and services associated with each party's performance under this Agreement, the parties agree to provide support services sufficient for Transactions to be exchanged. Each party will assist the other in establishing and/or maintaining support procedures, and will complete appropriate problem determination procedures prior to contacting the other with a support related matter. The parties agree to use all commercially reasonable efforts to avoid and resolve performance and unavailability issues. Each party will perform remedial action, as requested by the other, to assist in problem resolution. Each party, at its own expense, shall provide and maintain the equipment, software, services, and testing necessary to effectively and reliably transmit and receive transactions.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>3.</b></td>
    <td class="LabelValue" align="left" height="32">Data Retention.<br>
    MDCH will log all Transactions for the purpose of problem investigation, resolution, and servicing. The Trading Partner is responsible for maintaining and retaining its own records of data submitted to MDCH. Trading Partners who are healthcare providers will ensure that electronic healthcare claims submitted to MDCH can be readily associated and identified with the correct patient medical and business office records, and that these records are maintained in a manner that permits review, and for the time period as may be required by MDCH or other third party payer responsible for claim payment.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>4.</b></td>
    <td class="LabelValue" align="left" height="32">Proper Receipt and Verification for Transactions.<br>
    Upon proper receipt of any ANSI ASC X12N Standard Transaction, the receiving party shall promptly and properly transmit a functional acknowledgement in return, unless otherwise specified. The functional and interchange acknowledgements must be accepted and reviewed, when applicable, to confirm the receipt of a Transaction. The ability to send or receive functional acknowledgements is applicable only to ANSI ASC X12N Standard Transactions. Additionally, MDCH originated outbound Transactions must be accepted and reviewed, when appropriate, to obtain MDCH's response to specific inbound Transactions. The acknowledging party does not attest to the accuracy of the data contained in the transmission; rather, it only confirms receipt of the transmission.</td>
    </tr>
    <tr valign="center">
    <td class="Label" valign="top" nowrap align="right" width="1%" height="32"><b>5.</b></td>
    <td class="LabelValue" align="left" height="32">Liability.<br>
    MDCH shall not be responsible to the Trading Partner nor anyone else for any damages caused by loss, delay, rejection, or any misadventure affecting such electronic information. In addition, MDCH shall be excused from performing any EDI servi

    You cannot use string literal of more than 4000 characters in an Oracle SQL statement. I'm not going to count that string you so rudely posted but I presume it is longer than that figure. You'll need to use a variable instead.
    declare
        c clob := '<your vast XML doc here>';
    begin
        update PRVDR_ENRLMNT_AGREEMENT B set b.terms= c
        where ....
    {code}
    Cheers, APC                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • 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);

  • "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

  • ORA-01704:String literal too long with update of more than 4000 chars

    Hi,
    I want to update a table column in Oracle Database(version 10) with more than 4000 chars.
    The datatype of the table column is NCLOB.
    I want to achieve this with one single line of update query as below,
    update mytable set MY_DESCRIPTION = 'longdesc' where ID = '111' ;
    But there's a problem, if the 'longdesc' is more than 4000 chars, it gives the error , "ORA-01704:String literal too long"
    How can I achieve this in sql developer ?
    I dont want to do this using stored procedures, I want to do this update using only sql statement.
    Please help.
    thanks,
    sudhakar

    Hello Sudhakar,
    I am afraid, this will never work by SQL.
    Just because an SQL-Statement must not contain a string literal over 4,000 characters (or did that change lately?).
    Maybe you can bypass the limit with PL/SQL ... but you will certainly run into the 32K limit sooner or later
    regards
    Peter

  • ORA-00972: identifier is too long

    Hi All,
    I get the error ORA-00972: identifier is too long during installation of NW2004s SR2 Java system with DI. This error is seen on the step Perform post load activites. i have made the changes as suggested by SAP note: 314671. But the error still persists. Can anyone suggest what further more should be done here?
    Oracle is unable to delete : OPS$<14 letter host name>\SAPSERVICESR3 and hence the error.
    the output from ora_sql_results.log
    =============================================================
    2008-04-28, 19:04:56 SAPINST ORACLE start logging for
    @@SAPDBA_ADDITIONAL.SQL
    exit;
    Output of SQL executing program:
    SQL*Plus: Release 10.2.0.1.0 - Production on Mon Apr 28 19:04:56 2008
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    Connected.
    old   3:   :sSchemaUser := upper('&&1');
    new   3:   :sSchemaUser := upper('SAPSR3DB');
    old  19:   if upper('&&2') = 'NT' then
    new  19:   if upper('NT') = 'NT' then
    old  21:     :sDomain := upper('&&3');
    new  21:     :sDomain := upper('[14 letter Host Name]\SIDadm');
    old  32:   elsif upper('&&2') = 'UNIX' then
    new  32:   elsif upper('NT') = 'UNIX' then
    old  37:     RAISE_APPLICATION_ERROR(-20004,'Invalid OS, must be "NT" or "UNIX": ' || upper('&&2'));
    new  37:     RAISE_APPLICATION_ERROR(-20004,'Invalid OS, must be "NT" or "UNIX": ' || upper('NT'));
    using following Parameters:
    .  Schema User:                  SAPSR3DB
    .  Parametervalue os_authent_prefix:   OPS$
    .  OPS$SIDADM:                      OPS$[14 letter Host Name]\SIDADM
    .  SAP SID:                      SR3
    .  DB  SID:                      SID
    .  R/3 Service User:                 OPS$[14 letter Host Name]\SAPSERVICESR3
    .  Computer or Domain:                 [14 letter Host Name]\SIDADM
    old 119:   if upper('&&4') = 'SYN' then
    new 119:   if upper('SYN') = 'SYN' then
    old 137:   if upper('&&4') = 'SYN' then
    new 137:   if upper('SYN') = 'SYN' then
    create synonym: SAP_SDBAH SAPSR3DB.SDBAH
    create synonym: SAP_SDBAH SAPSR3DB.SDBAD
    unable to delete user: OPS$[14 letter Host Name]\SAPSERVICESR3
    begin
    ERROR at line 1:
    ORA-00972: identifier is too long
    ORA-06512: at line 46
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SAPINST: End of output of SQL executing program C:\oracle\product\10.2.0\db_1/bin/sqlplus.
    SAPINST found errors.
    SAPINST The current process environment may be found in sapinst_ora_environment.log.
    2008-04-28, 19:04:56 SAPINST ORACLE stop logging
    Thanks in advance,
    Arun E V

    Hi Markus/Stefan,
    Thanks for the quick answer. I know i am using a unsupported version, but that should not be a problem here. Though i have not run the installer from the script, still the DB is a successful installation and i have used it like this a few times.
    Stefan, I have seen the note and made the required modification but still the issue persists. Is there anything more that i need to do apart from what is mentioned in the note?
    The trouble is we are not in a position to change the host name as suggested and would prefer to continue with the same name.
    Thanks,
    Arun E V

Maybe you are looking for

  • How can I check if an user has access to an url within my web app?

    Hi, I have a web application where I allow the users to set their startup page by presenting them a list of startup pages. However, some startup pages can accessed only by certain users, so I want to present the user only those pages the user has acc

  • Goods return-tax calculation

    Hi gurus, am SD consultant and i wud be grateful if somebody clarify this, i have sold some xx goods to the customer and paid the tax to the government and after some time my customer returned some of the goods to the company and we refunded the full

  • Request timed out because there has been no reply from the server

    Hi, I am using "Embedded report application server 11.5". When i am going to launch report with the help of above mentioned server i am getting "Request timed out because there has been no reply from the server for more than 600,000 milliseconds" err

  • Dynamic actions in infotypes

    Hi all, I am calling one infotype(i.e 22) three times in my infogroup but when i write a subroutine on this infotype, it doesn't get called more than once. I want my infotype to be called three times. Yogesh

  • Lookup soap inside udf

    hi, i am tring to use soap inside udf for lookup api. i am looking at class com.sap.aii.mapping.lookup.SystemAccessor. is this class for soap lookup?  i am not clear on soap lookup  since i have not created any message interface for jdbc, rfc lookup.