BUG: constant expression required

Hello,
the attached code fragment compiles with javac but produces a "constant expression required" with internal compiler (Version 10.1.3.0.4 (SU2))
Regards
Michael
package bug.repro;
public class Class1 {
protected final int TYPE_LH = 1;
package bug.repro;
public class Class2 extends Class1 {
protected void checkRule(int iStatus)
switch (iStatus) {
case TYPE_LH:
break;
-------

Hi,
thanks, i filed a bug.
Frank

Similar Messages

  • Error #: 409 : constant expression required at line 342

    hi all,
    switch( nodeClicked.hashCode() ) {
    case "Devices".hashCode(): showPanel_Devices();
    break;
    case "Clusters".hashCode(): showPanel_Clusters();
    break;
    case "General".hashCode(): showPanel_General();
    scan.nas.executeNTP(scan.getIPFromHash(parentNUSNode));
    scan.nas.executeSystemInfo(scan.getIPFromHash(parentNUSNode));
    scan.setValuesInNTP();
    scan.setValuesInSystemInfo();
    break; default: showPanel_LHNScreen();
    break;
    i am getting error at
    "Devices".hashCode()
    its saying that "constant expression required" at that place.......
    can anyone help me plz.....its urgent..............
    Thanks,
    Kalpana

    Case statements need integer literals or constant integer expressions. No runtime expressions are allowed.
    Do this instead:
    if(nodeClicked.equals("Devices")) ...;
    else if(nodeClicked.equals("Clusters")) ...;
    else if(nodeClikcked.equals("General")) ...;
    else ...;It's not a good idea to use hash codes like this, because two objects with different values can have the same hash code.

  • Constant expression required

    (Original thread http://forum.java.sun.com/thread.jsp?forum=31&thread=428634)
    Hello all,
    in the following class, if the comment is removed, the compiler complains that a constant expression is required.
    class Test {
    final static int A;
    final static int B=5;
    static {
    A=5;
    public static void main(String args[]) {
    switch(1) {
    //case A:
    case B:
    Is this a bug? Is this a feature? How could A not be a constant expression?
    Is it good coding style to initialize constant variables at declaration time and not in the static block?
    7Kami

    (Original thread
    http://forum.java.sun.com/thread.jsp?forum=31&thread=42
    634)
    Hello all,
    in the following class, if the comment is removed, the
    compiler complains that a constant expression is
    required.
    class Test {
    final static int A;
    final static int B=5;
    static {
    A=5;
    public static void main(String args[]) {
    switch(1) {
    //case A:
    case B:
    Is this a bug? Is this a feature? How could A not be a
    constant expression?JLS goes to a lot of detail explaining why this is a language feature. It is required to support Java's requirement to never have unreachable code. In order to do that, the compiler need to have compile-time const expressions in case labels (otherwise it can never detect at static compilation time whether a case branch is reachable or not [e.g., because it clashes with another case label]). Those expressions could be either literals or static finals etc.
    This, BTW, explains why inlining of static finals is not just an optimization but an essential language requirement.
    The relevant JLS sections to read are 14.20 and 13.4.8.

  • Switch: constant expression required

    Hi,
    i initialize some integer constants with the hash code of some strings. However, i cannot use these constants in "case"s of "switch". How can i deal with this?
    Here's the code:
        public void parseHeader()
            char[] headerChars=header_.toCharArray(); //the array representation of the XML header tag
            StringBuffer sBuffer=new StringBuffer();  //the String
            char c=' ';
            int fieldCode=0;
            for (int i=0; i<headerChars.length; i++)
                c=(char)headerChars;
    if (c=='\n')
    switch(fieldCode)
    case ACCEPT:
    sAccept_=new String(sBuffer);
    break;
    case ACCEPT_CHARSET:
    sAcceptCharset_=new String(sBuffer);
    break;
    case ACCEPT_ENCODING:
    sAcceptEncoding_=new String(sBuffer);
    break;
    case ACCEPT_LANGUAGE:
    sAcceptLanguage_=new String(sBuffer);
    break;
    case AUTHORIZATION:
    sAuthorization_=new String(sBuffer);
    break;
    case CACHE_CONTROL:
    sCacheControl_=new String(sBuffer);
    break;
    case CLIENT_IP:
    sClientIp_=new String(sBuffer);
    break;
    case INT_CONNECTION:
    sConnection_=new String(sBuffer);
    break;
    case CONTENT_LANGUAGE:
    sContentLanguage_=new String(sBuffer);
    break;
    case CONTENT_LOCATION:
    sContentLocation_=new String(sBuffer);
    break;
    case CONTENT_MD5:
    sContentMD5_=new String(sBuffer);
    break;
    case WARNING:
    sWarning_=new String(sBuffer);
    break;
    case X_FORWARDED_FOR:
    sXForwardedFor_=new String(sBuffer);
    break;
    case X_SERIAL_NUMBER:
    sXSerialNumber_=new String(sBuffer);
    break;
    default:
    System.err.println("Header field with hash code: "+fieldCode+" detected");
    else if (c==':')
    fieldCode=new String(sBuffer).hashCode();
    sBuffer=new StringBuffer();
    else
    sBuffer.append(c);
    private static final int ACCEPT= "Accept".hashCode();
    private static final int ACCEPT_CHARSET="Accept-Charset".hashCode();
    private static final int ACCEPT_ENCODING="Accept-Encoding".hashCode();
    private static final int ACCEPT_LANGUAGE="Accept-Language".hashCode();
    private static final int AUTHORIZATION="Authorization".hashCode();
    private static final int CACHE_CONTROL="Cache-Control".hashCode();
    private static final int CLIENT_IP="Client-ip".hashCode();
    private static final int CONNECTION="connection".hashCode();
    private static final int CONTENT_LANGUAGE="Content-Language".hashCode();
    private static final int CONTENT_LOCATION="Content-Location".hashCode();
    private static final int CONTENT_MD5="Content-MD5".hashCode();
    private static final int WARNING="Warning".hashCode();
    private static final int X_FORWARDED_FOR="X-Forwarded-For".hashCode();
    private static final int X_SERIAL_NUMBER="X-Serial-Number".hashCode();
    Message was edited by:
    uig

    the labels in a switch-case statement have to be compile-time constant. Anything that involves calling a method is not.
    you could make an enumerated type
    http://java.sun.com/j2se/1.5.0/docs/guide/language/enums.html

  • Error: An integer constant expression is required within the array subscrip

    hello all,
    here is a small piece of code which compile well with g++:
    #include <iostream>
    using namespace std;
    int main () {
    int i= 0, j=4 ;
    cout <<" i=" ; cin >> i ;
    cout  << "i="<<i<< endl;
    if ( i > 1) {
       double xx [i+5];
       int n= i+5;
       for (int k =0 ; k < n ; k++) xx[k] =k;
      cout << "xx[2]=" << xx[2] << " xx[4]=" << xx[4] <<" xx["<<i<<"]="<< xx[i] <<en
    dl;
      cout << "xx[1]=" << xx[3] << " xx[5]=" << xx[4] <<" xx["<<n-1<<"]="<< xx[n-1]
    <<endl;
    }with Sun Studio 12 CC, the error is:
    "x.C", line 12: Error: An integer constant expression is required within the array subscript operator.
    1 Error(s) detected.Is there an option to force CC to accept it? i read that CC has some gnu extensions (http://docs.sun.com/source/820-4155/c++.html)
    Thanks in advance for help,
    gerard

    This works:
    #include <iostream>
    #include <alloca.h>
    using namespace std;
    int main () {
    int i= 0, j=4 ;
    cout <<" i=" ; cin >> i ;
    cout  << "i="<<i<< endl;
    if ( i > 1) {
       double *xx = ( double * ) alloca( sizeof( *xx ) * ( i + 5 ) );
       int n= i+5;
       for (int k =0 ; k < n ; k++) xx[k] =k;
      cout << "xx[2]=" << xx[2] << " xx[4]=" << xx[4] <<" xx["<<i<<"]="<< xx[i] <<en
    dl;
      cout << "xx[1]=" << xx[3] << " xx[5]=" << xx[4] <<" xx["<<n-1<<"]="<< xx[n-1]
    <<endl;
    }

  • NI USB 6008: expected constant expression

    I am using NI USB 6008 device. Looking at NI-DAQ\Examples\DAQmx ANSI C\Analog In\Measure Voltage\Acq-Int Clk\
    So I want to modify the line that has
    DAQmxErrChk (DAQmxReadAnalogF64(taskHandle,1000,10.0,DAQmx_Val_GroupByChannel,data,1000,&read,NULL));
    as
        DAQmxErrChk (DAQmxReadAnalogF64(taskHandle,numsamps,TimeouT,DAQmx_Val_GroupByChannel,data,numsamps,&read,NULL));
    where the corresponding variables have been defined before like:
      Int_t xx=2;
      const Int_t numsamps = const_cast<Int_t&>(xx);
        int32       error=0;
        TaskHandle  taskHandle=0;
        int32       read;
        float64     data[numsamps];
        float64 RatE = float64(raTE);
        float64 TimeouT = float64(numsamps)/RatE;
    But when I try to compile I get this error message:
    $ nmake -f makefile.mak
    Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
    Copyright (C) Microsoft Corporation.  All rights reserved.
            cl  -D_MT -D_DLL -MDd -EHsc  -nologo -G5 -GR -MD -DWIN32  -DVISUAL_CPLUS
    PLUS -D_WINDOWS -IC:\ROOT/include -O2 -c SNatInDAQ.cpp
    cl : Command line warning D9025 : overriding '/MDd' with '/MD'
    cl : Command line warning D9002 : ignoring unknown option '-G5'
    SNatInDAQ.cpp
    SNatInDAQ.cpp(261) : error C2057: expected constant expression
    SNatInDAQ.cpp(261) : error C2466: cannot allocate an array of constant size 0
    SNatInDAQ.cpp(261) : error C2133: 'data' : unknown size
    NMAKE : fatal error U1077: '"c:\Program Files\Microsoft Visual Studio 8\VC\BIN\c
    l.EXE"' : return code '0x2'
    Stop.
    What does it mean 'expected constant expression'? How can I get around this?
    What I want to do is pass the size of that data array from another function.

    Hi novaiscool,
    I think the issue is that you are declaring numsamps as a constant and the DAQmxReadAnalogF64 function wnats a non constant parameter.  Have you tried calling the function with a regular int or a value?  Give that a try and see if you get the same error. 
    You will also need to initialize numsamps to something since you are allocating an array using that variable. 
    Give those things a try and let me know how it works.
    Thank You,
    Nick F.
    Applications Engineer

  • ORA-56901: non-constant expression is not allowed for pivot|unpivot values

    Getting following errors
    ORA-56901: non-constant expression is not allowed for pivot|unpivot values
    ORA-06512: at "APPS.PIVOT_AWARD", line 16
    ORA-06512: at line 5
    when i run the following function it is giving error as above.
    can you please help me
    create or replace
    Function Pivot_award return sys_refcursor
    IS
       v_dept    VARCHAR2 (20000);
       v_query   VARCHAR2 (1000);
       op_rs sys_refcursor;
    BEGIN
      SELECT LISTAGG(award_number,',') WITHIN GROUP (ORDER BY award_id)
      INTO V_DEPT FROM xxdl.XXDL_CD_SCHEDULE_K_GTT ;
       v_query :=
          'SELECT *
            FROM (
            select award_name, award_id,award_number from xxdl.XXDL_CD_SCHEDULE_K_GTT)
            PIVOT(max(VAL) for award_number in  ('||v_dept||'))';
       OPEN op_rs FOR v_query;
       return op_rs;
    END;
    SELECT LISTAGG(award_number,',') WITHIN GROUP (ORDER BY award_id)
      INTO V_DEPT FROM xxdl.XXDL_CD_SCHEDULE_K_GTT ;
    Result of 1st query is PPE_T_CAPITAL,XIBNG,XIABP,XIABQ,XIABR,XIABS,XIABT,XIABU,XIABV,XIABW,XIAAE,XIAAF,XIAAG,XIAAH,XIAAI,XIAAJ,XIAAK,XIAAL,XIAAM,XIAAN,XIAAO,XIAAP,XIAAQ,XIAAR,XIAAS,XIAAU,XIAAU,XIAAV,XIAAZ,XIABD,XIABE,XIABF,XIABG,XIABH,XIABI,XIABJ,XIABK,XIABL,XIABM,XIABN,XIAAA,XIAAB,XIAAC,XIAAD,XIABY,XIABZ,XIACA,XIACB,XIACC,XIACD,XIACE,XIACF,XIACG,XIACH,XIACI,XIABA,XIAAW,XIAAX,XIAAY,XIACN,XIACT,XIACU,XIACP,AAAEX,XIACW,XIADC

    Hi Frank,
    Here is the create table and insert script. This is needed for me to show in report rows to columns.
    create table award_test(
      AWARD_NUMBER                            VARCHAR2 (15) ,                                                                                                                                                                                
    AWARD_NAME                              VARCHAR2(30)  ,                                                                                                                                                                               
    TOTAL_PROCEEDS                          NUMBER    ,                                                                                                                                                                                   
    EARNING_PROCS                           NUMBER    ,                                                                                                                                                                                   
    TOT_PROCS_EARNINGS                      NUMBER   ,                                                                                                                                                                                    
    GROSS_PROCS                             NUMBER   ,                                                                                                                                                                                    
    PROC_REF_DEF_ESCR                       NUMBER   ,                                                                                                                                                                                    
    OTH_UNSP_PROCS                          NUMBER  ,                                                                                                                                                                                     
    ISSUANCE_COST                           NUMBER   ,                                                                                                                                                                                    
    WORK_CAP_EXP                            NUMBER 
    --insert script
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIAAE','CEFA CP',300000000,200,300000200,300,500,600,0,700);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIABG','CEFA K',0,null,0,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIAAS','Escondido Village #3',0,null,0,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('AAAEX','SU2009A',801806000,null,801806000,null,null,null,1806000,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIABI','CEFA L-6',17815000,null,17815000,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIAAP','CEFA R',115050508.15,null,115050508.15,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIACG','CEFA D',53150000,null,53150000,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIAAB','Stu Union-1962',0,null,0,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIAAA','Notes Payable-Commercial Paper',350000000,null,350000000,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIABZ','CEFA L-3',9840000,null,9840000,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIAAV','CEFA B',18106540,null,18106540,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIAAI','Medium Term Notes - Tranche 3',50000000,null,50000000,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIAAZ','Recycling Pool',473379904.44,null,473379904.44,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIAAY','CEFA T2',187550000,null,187550000,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIAAM','GMAC',0,null,0,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIAAU','CEFA A/K',16922982,null,16922982,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIAAC','SU TB 2002A - PARS',50000000,null,50000000,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIABL','CEFA L-9',15490000,null,15490000,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIABY','CEFA L-2',8775000,null,8775000,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIAAJ','Frat 1&2',0,null,0,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIAAW','CEFA S',180727500,null,180727500,null,null,null,-472500,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIAAQ','Escondido Village #1',0,null,0,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIACW','CEFA U',0,null,0,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIACF','CEFA E',19753227.34,null,19753227.34,null,null,null,-106772.66,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIACN','CEFA T3',27562758.96,null,27562758.96,null,null,null,-47941.04,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIAAG','Medium Term Notes - Tranche 1',50000000,null,50000000,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('PPE_T_CAPITAL','PPE_T_CAPITAL',0,null,0,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIAAK','Frat 3',0,null,0,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIAAF','Tresidder',0,null,0,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIABH','CEFA L',5055000,null,5055000,null,null,null,0,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIAAU','CEFA A/K',6605655,null,6605655,null,null,null,-74345,null);
    Insert into "award_test" (AWARD_NUMBER,AWARD_NAME,TOTAL_PROCEEDS,EARNING_PROCS,TOT_PROCS_EARNINGS,GROSS_PROCS,PROC_REF_DEF_ESCR,OTH_UNSP_PROCS,ISSUANCE_COST,WORK_CAP_EXP) values ('XIAAD','SU 2024 Bonds',150000000,null,150000000,null,null,null,0,null);Expected output rows to columns (i took first two insert statements)
    'XIAAE','CEFA CP',300000000,200,300000200,300,500,600,0,700
    'XIABG','CEFA K',0,null,0,null,null,null,0,null
    I need to have awardnumber and corresponding details below
    'XIAAE'       'XIABG'
    'CEFA CP'    'CEFA K'
    300000000   0
    200             null
    300000200   0
    This way i need to get all the information vertically with awardnumber. I have written following code but it is not working.
    create or replace
    Function Pivot_award return sys_refcursor
    IS
       v_dept    VARCHAR2 (20000);
       v_query   VARCHAR2 (1000);
       op_rs sys_refcursor;
    BEGIN
      SELECT LISTAGG('''' || award_number || '''',',') WITHIN GROUP (ORDER BY award_number)
      INTO V_DEPT FROM award_test ;
       v_query :=
          'SELECT *  from award_test
            UNPIVOT(VAL for operator in(                                                                                                                                                                                                       
    AWARD_NAME,                                                                                                                                                                                                              
    TOTAL_PROCEEDS,                                                                                                                                                                                                             
    EARNING_PROCS ,                                                                                                                                                                                                              
    TOT_PROCS_EARNINGS ,                                                                                                                                                                                                           
    GROSS_PROCS    ,                                                                                                                                                                                                               
    PROC_REF_DEF_ESCR ,                                                                                                                                                                                                        
    OTH_UNSP_PROCS ,                                                                                                                                                                                                              
    ISSUANCE_COST ,                                                                                                                                                                                                            
    WORK_CAP_EXP ))
            PIVOT(max(VAL) for award_number in  ('||v_dept||'))';
       OPEN op_rs FOR v_query;
       return op_rs;
    END;throwing an error ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at "APPS.PIVOT_AWARD", line 11
    ORA-06512: at line 5
    also when i run simple query
    SELECT *  from award_test
            UNPIVOT(VAL for operator in(                                                                                                                                                                                                       
    AWARD_NAME,                                                                                                                                                                                                              
    TOTAL_PROCEEDS,                                                                                                                                                                                                             
    EARNING_PROCS ,                                                                                                                                                                                                              
    TOT_PROCS_EARNINGS ,                                                                                                                                                                                                           
    GROSS_PROCS    ,                                                                                                                                                                                                               
    PROC_REF_DEF_ESCR ,                                                                                                                                                                                                        
    OTH_UNSP_PROCS ,                                                                                                                                                                                                              
    ISSUANCE_COST ,                                                                                                                                                                                                            
    WORK_CAP_EXP ))
            PIVOT(max(VAL) for award_number in  ('PPE_T_CAPITAL','XIBNG','XIABP')) Throwing an error
    ora-01790 Expression must have same datatype as correspoding expression
    Edited by: 893185 on Nov 10, 2011 2:00 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Using constant expression in query

    When I write a query, if I use a bind variable that could be null as for example:
    select *
    from table
    where :variable is null or column = :variable
    the performance drops significantly.
    I can't find any reason, so if you can help me...
    I also tried something simpler, and something I thought it shoud be faster.
    select *
    from table
    where 1=1 or column = :variable
    this query should return all the table, since 1=1 is allways true. It should be easier to evaluate, since it's the same as before, but it does not need to bind the variable. It takes five times longer than before.
    What I am looking for is to understand what the database does when I run this queries.
    Thankyou very much
    Edited by: user4823534 on 27-abr-2010 9:16

    I think I didn't explain myself.
    I have several very complex querys that use bind variables as optional parameters.
    What I noticed is that it's much slower (100 times maybe) to have a constant expression which is true in an or than evaluating something else. For example
    select * from table where :a is null or column1 in (select column1 from table2 where a = :a) should be faster than
    select * from table where column1 in (select column1 from table2 where a = :a) since the last one has to evaluate the in clause, and the first one is allways true.
    Thankyou for your patience and sorry for my bad english.

  • [svn:bz-trunk] 21393: Excluding all tests for bug 184631 as required webservice is no longer available and no bug information exists .

    Revision: 21393
    Revision: 21393
    Author:   [email protected]
    Date:     2011-06-16 08:03:16 -0700 (Thu, 16 Jun 2011)
    Log Message:
    Excluding all tests for bug 184631 as required webservice is no longer available and no bug information exists.
    Modified Paths:
        blazeds/trunk/qa/features/excludes.properties

    It has solved itself today. After making a -Syu today and installing a newer kernel then reinstalling catalyst-dkms from AUR it is working again!! )))) Marking as solved.
    Kernel: 3.9.5-1-ARCH
    Catalyst-dkms: 13.1-2 (instead of newest 13.4-1)
    Last edited by szebenyib (2013-06-14 12:02:42)

  • Does an Airport Express require a wired connection to boost a Wi-Fi signal if I already have a wired Airport Time Capsule on the Network?

    I want to boost the Wi-Fi signal around my house. I have a 3TB Airport Time Capsule connected to my Virgin Media modem via a WLAN connection but wonder if an Airport Express device can be used at a remote location purely wirelessly - apart from a power connection obviously?

    Does AirPort Express require a wired connection.......if I already have a wired AirPort Time Capsule on the Network?
    No, but you will have much better network performance if you do wire the AirPort Express.
    The reason for this is that when you try to extend a network using wireless, you will typically lose about a half of the potential speed capability on the network.
    There is no network speed loss when you wire the Express.
    Here is what Apple's support document says about this:
    In the case of a wirelessly extended network, throughput may be reduced to less than 60 percent of that of a single device. The general rule is to keep the Wi-Fi network as simple as possible. You can accomplish this by using the minimum number of Wi-Fi base stations required to service the physical network area and by using Ethernet wherever possible.
    Extending the range of your Wi-Fi network by connecting Wi-Fi base stations together using Ethernet is always the best option, and will provide the best throughput

  • WebTest - VS2013 - Extract Regular Expression - Required=False

    I have an "Extract Regular Expression" that may or may not be able to extract a value. I set the property value of Required to False. The next block checks for the existence of that Context Parameter. If the Context Parameter is there, it does
    some work, if the Context Parameter is not there, it skips the condition.
    When I run my WebTest, it tells me that it passes the extraction rule but it never created the Context Parameter so the condition is skipped.
    If I set Required=True, everything works as expected.
    I remembered that there was a defect in VS2010 with the Required=False, so I added this Extraction Plug-In 
    [DisplayName("Extract Regular Expression Not Required")]
    [Description("Extract text matching a regex and add it to the test context. If no match is found, do not fail webtest. This gets around a VSTS bug where 'Required' property of the Extract Regular Expression rule is not honored.")]
    public class ExtractRegularExpressionNotRequired : ExtractRegularExpression
    public override void Extract(object sender, ExtractionEventArgs e)
    base.Extract(sender, e);
    e.Success = true;
    That too passes the regular expression but fails to create the Context Parameter.

    By setting the Required parameter to False, I am expecting that a Context Parameter does not get created if the regular expression is not found and that is does get created if the regular expression is found.
    So when I run my test, it tells me that the regular expression was found but my Context Parameter was not created. 
    When I created this webtest in VS2010, I found that there was a bug with the Extract Regular Expression when the Required property was False. This
    thread showed the code for a custom Extraction rule to fix the problem. When I run this webtest in VS2013, both the built-in Extract Regular Expression and the custom Extract Regular Expression Not Required are not creating the Context Parameter if the
    regex is found.
    Try this yourself:
    Create a webtest
    Add "Extract Regular Expression"
    Set the Regular expression to . (this will match any one character)
    Set the Requiredto False
    Set the Context Parameter Name to TEST
    Run the webtest
    Although the result from the extraction rule will be Passed, there is no Context Parameter TEST created. 
    If you create the custom Extract Regular Expression Not Required plugin, the same problem occurs.

  • OIM 11g R2 PS1 - Bugs fixed info required

    Hi ,
    I have OIM 11g R2 with BP 06 installed on my system and want upgrade to latest version so that majority of bug fixes are incorporated. As both BP07 and PS1 are in market.
    While checking for BP7 fixes we noticed that there are certain fixes that we really require in our application like:
    Bug:16315001 : GTC mapping image on migration to other environment is not displayed.
    Bug:16506870 : De-provisioning of user accounts via the Set User De-provisioned Date scheduled job fails.
    Bug:16347855 : Users are able to submit a request for modify account although nothing is modified on the form fields.
    But while checking for release notes of PS1 (11.1.2.1) i did not notice any such fixes, rather there were some certification exception fixes ,new menu called "Certification" in Sysadmin Console and Introduced new menu called "Inbox" in Identity/Self Service Console
    So my question is that to apply above fixes we need install the BP7 patch separately, considering PS1 is not a cumulative one and then install PS1
    Thanks,
    Puneet

    Hi,
    Check out: http://www.iamidm.com/2013/05/oim-11g-r2-ps1-certification-tab-in.html
    Regards,
    Chinni

  • Bug: Application Express - Multiple pages with same name

    In my APEX application, I have mulltiple pages with the same name (user requirement). In SQL Developer, it shows the pages with the same name under the MAX Page ID. For instance, I have pages 18, 21 and 22 with the name of "Binder". In SQL Developer I see 3 APEX Page entries for Page 22. And it shows all of the page items for Page 22 in all of the entries.
    Thanks,
    Dan

    If I delete extra .ipa files when two different applications have the same name, then I need to keep track of which is the current version of what. "Sudoku 4.ipa" might be the latest version of one program, and "Sudoku 7.ipa" could be the latest version of another.
    I wish Apple would create a naming scheme where every application has a unique name, and sequential generations are not used. This would make it much cleaner, and there would be no ambiguity as to either which program is which, or which version is which.
    I find the safest way to get rid of all the dups is to just delete them all and re-download the app. The bugs in iTunes still make a mess of things, though.

  • Does AirPort Express require better Internet than Ethernet?

    Wondering since I was having intermittent problems w my Linksys router &amp; trouble updating it so thought switching to Airport Express would give me a simple way to get things working.
    Very disappointed that noes it's worse than before. Yesterday after a # of tries I did get it partly set up &amp; although amber blinking lights, I was able to use Internet.
    Called Set up AppleCare call online to resolve amber light issue. She had me reset modem &amp; when we were done, I again had green light on Airport BUT NO INTERNET CONNECTION. She said to call my ISP cox.
    I did try after a reset to connect MacbookPro directly to Ethernet &amp; got it to connect. Then I unplugged Ethernet from Mac &amp; plugged into airport &amp; no connection again.
    So instead of Airport Express making things better, they are worse. I'm typing this on my iPhone 4S which for some reason has really slowed down.
    I learned that my old Motorola Surfboard modem is Docsis 2.0 &amp; cox is switching to 3.0.
    But it was working better, although frequent brief loss of connection.
    So does Airport require a better modem or better connection than just Ethernet or via my Linksys E1200?
    Not happy also that functionally worse off after calling AppleCare. I know she didn't cause the issue but her suggestion while standard tipped it over to not be connecting.
    &amp; typing all this on my iPhone is not fun although it did just now get back temporarily there for just a bit to its usual speed but now back to having to wait for it.

    Well I did the power down reset. But I think you missed the import of my question.
    I'm talking about an older modem that may be marginal. Not positive about the 2 Ethernet cables I have used either.
    So yes if the modem is working as it should I guess it should make a difference.
    But something is weird when I can can next via Ethernet &amp; then I just unplug the the rent from my Mac &amp; plug it into the wan port on the AirPort Express &amp; no connection.
    To look at the modem &amp; Airport across the room the lights make it look like they are fine.
    I just done have Internet connection to my Mac. I did yesterday w the amber lights flashing.
    &amp; I was connecting w the Linksys but had frequent loss of connection.
    So wondering if maybe Airport has slightly greater requirements that act as a tipping point so it connected without it but doesn't connect w it. But the green light supposedly shows its working fine.
    Well I did put out a wanted request on FreeOC for a compatible Docsis 3.0 cable modem. Supposedly they work better &amp; that might just make the difference.
    Don't really want to buy a new modem when I'm about to move to a new area where requirements might be different.

  • Vivado 2015.1 Bug Report: Adding Required Port without Default Value in Custom Interface Definition

    When adding a port using the Custom Interface Definition window and not defining a Default Value, the attached error message appears.  Not only are the html tags visible, but this error should not be thrown in the first place if both Master/Slave Presense is set to "required".  As it is, a port can only be added if a Default Value is given, but can be removed later from the ports table.

    yes,I have successfully install petalinux2015.2,but,the issue still be the same as before,the axi 16550 is not working,when I run echo 123 > /dev/ttyS1,my ttyPS0 stop working and axi com keeping null output...
    then,I try petalinux2014.4+petalinux2014.4,the difference is the ttyPS0 still alive but axi-com still null...
    I found that pl.dtsi file is quite different between the three mode:
    M1,petalinux2014.4+vivado2015.1
    M2,petalinux2015.2+vivado2015.1
    M3,petalinux2014.4+vivado2014.4
    most confuse for me is the interrupt ID,
    in vivado I connect the axi intterrupt to ID 62 but I get different auto generate dts file
    M1:nothing about interrupt and i add manuually in system-top.file
    M2:vivado ID is 61 but dts "interrupts = <0 30 4>"
    M3:vivado ID is 62 but dts "interrupts = <0 31 4>"
    does petalinux auto detect the vivado interrupt connection and ID and write to dts file right or User have to verify and rewrite in ststem-top.dts?
    working hard for the issue and hope for a axi demo including petalinux + vivado ,help please

Maybe you are looking for

  • Photoshop CC crashes on startup under OS X 10.8.5

    After Adobe Creative Cloud installed Photoshop CC via the root account, see: http://forums.adobe.com/thread/1302496 The Adobe Photoshop CC 14.1.1 (14.1.1.415) crashes immediately on startup under OS X 10.8.5 unless I am running logged into the root a

  • Validate plants selected in Abap Query selection screen

    Hi Everyone, I have a requirement wherein i have to validate 'authority check' for the plants populated in the selection screen in an already created abap query. I tried adding code in the code section. But i dont know how to use the select-option pa

  • Connecting my 550 Powerbook with Linksys 354G Gateway Kit

    Hello and help! I've just set up my iMac with the Linksys modem router and ethernet connection and all works OK. I now want to use the Linksys WPC54G V.5 PMCIA card that came with kit with my 2nd computer, a 550 PB.. I plugged the card into the PB an

  • How to download oracle database 11g in macbook pro

    how to download oracle database 11g in macbook pro

  • How to set DB driver's encoding ??

    I'm currently using Access 2000 with tomcat as server. My problem is how to set the database's encoding in java ?? for both read and write ?? I'm trying to storea strings from the JSP in UTF-8 format in to access but as I retrieve it from database it