Need help with EXECUTE IMMEDIATE

I have created a CHAR string in my form that contains a UPDATE statement. This statement is passed into my procedure and in the procedure, the EXECUTE IMMEDIATE is supposed to run the UPDATE statement. THIS IS NOT THE CASE for some reason. NEWVALUE is record is also passed into the procedure.
this is the UPDATE_STATEMENT statement prepared by my forms application:
'UPDATE xtable SET ACTION_CODE_DESC =''a b c'',INACTIVE =''N'' WHERE ACTION_CODE = newValue.ACTION_CODE'
The CHAR values are surrounded by a pair of single quotes. The UPDATE statement starts and ends with single quotes.
In my procedure I have this statement:
PROCEDURE JKUPD_ACTION_CODE
( newValue in etmst_action_code%rowtype
,UPDATE_STATEMENT in CHAR
,perr_count out number
AS
BEGIN
EXECUTE IMMEDIATE UPDATE_STATEMENT ;
IF SQL%NOTFOUND
THEN .......
I keep getting ORA-00900: invalid SQL statement and dont understand why this is happening.
Any ideas anyone?
Thanks :)

I haven't seen a version indication for this thread, but there should be 2 (different!) functions that come with Oracle that might do what you want.
If all you want to do is dynamically execute text representing a SQL command check the on-line documentation (if there is any) for dbms_sql.execute and/or dbms_utility.exec_ddl. Make sure the string passed in are syntactically correct :)

Similar Messages

  • Help with EXECUTE IMMEDIATE and DROP

    Hi all,
    we are trying to create a procedure to do the following:
    * We have in the database some tables named like C$_XXXXXXXXX
    * We want to drop some of these tables that have a common prefix (f.e C$_1203101)
    DECLARE
    v_sql VARCHAR2(300);
    BEGIN
    SELECT 'DROP TABLE ODISTAG.'|| TABLE_NAME ||';' INTO v_sql FROM USER_TABLES WHERE TABLE_NAME LIKE 'C$_1203101%';
    EXECUTE IMMEDIATE v_sql;
    END;
    But we get this error:
    Error report:
    ORA-00911: invalid character
    ORA-06512: at line 5
    00911. 00000 - "invalid character"
    *Cause:    identifiers may not start with any ASCII character other than
    letters and numbers. $#_ are also allowed after the first
    character. Identifiers enclosed by doublequotes may contain
    any character other than a doublequote. Alternative quotes
    (q'#...#') cannot use spaces, tabs, or carriage returns as
    delimiters. For all other contexts, consult the SQL Language
    Reference Manual.
    *Action:
    Any help on that please?
    Thanks!

    This will not work if you fetch more than one row..instead you can do this..
    DECLARE
         v_sql VARCHAR2(30000);
    BEGIN
         for c2 in (
                        SELECT 'DROP TABLE ODISTAG.'|| TABLE_NAME drp
                        FROM USER_TABLES WHERE TABLE_NAME LIKE 'C$_1203101%'
         loop
              v_Sql := c2.drp;
              EXECUTE IMMEDIATE v_sql;
         end loop;
    END;

  • Need help with my usecase based on transient ViewObject

    I am using 11.1.1.4.0 Jdev version. I need help with my usecase.Been trying it for 2 days but couldn't figure out the issue.
    I have a transientVO . In this VO Rows will be populated programmatically. CountryId is an attribute of this VO. I have created a viewAccessor "CountriesVA" from Country VO of HR schema.
    I have a LOV for the countryId which is based on this VA ,getting countries from CountryTable.
    This is the model part which works fine.
    Before the page load i have called  a method to create a row for this transientVO.Once the row is created i can see the SOC in my page which i have created as below.
    Now i want to insert a row in the transientVO if user selects a country and restrict duplicate entry . (As One row is already created 1st time there will be no rows created.after that rows will be inserted)
    The issue is :: Suppose there are 2 countries. A & B .When user does the following actions :
    Insert A . Done //as 1st entry
    Insert B . Done //as 1st time entry
    Insert A . duplicate not inserted
    Insert B . getting inserted // the bug.
    <af:selectOneChoice value="#{bindings.CountryId.inputValue}"
                            label="#{bindings.CountryId.label}"
                            required="#{bindings.CountryId.hints.mandatory}"
                            shortDesc="#{bindings.CountryId.hints.tooltip}" id="soc1"
                            immediate="true" autoSubmit="true"
                            valueChangeListener="#{pageFlowScope.managedBean.countryIdVC}">
        public void countryIdVC(ValueChangeEvent valueChangeEvent) {
            // Add event code here...
            String oldValue=null;
              setEL("#{bindings.CountryId.inputValue}", valueChangeEvent.getOldValue());
              if(evaluateEL("#{bindings.CountryId.attributeValue}")!=null)
             oldValue =evaluateEL("#{bindings.CountryId.attributeValue}").toString();
                    setEL("#{bindings.CountryId.inputValue}", valueChangeEvent.getNewValue());
            String newValue=evaluateEL("#{bindings.CountryId.attributeValue}").toString();
            BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
             DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("ViewObj1Iterator");
             //access the underlying RowSetIterator
             RowSetIterator rsi = dciter.getRowSetIterator();
          boolean duplicate=true;
          if(oldValue!=null){
                    rsi.getCurrentRow().setAttribute("CountryId", oldValue);
        //  Row row= rsi.findByKey(new Key(new Object[] { newValue}), 1)[0];
          Key key =new Key(new Object[] { newValue});
          Row row=rsi.getRow(key);
          if(row==null){
          System.err.println(duplicate);
            duplicate=false;
          }else{
            rsi.setCurrentRow(row);
             if(!duplicate){
             //get handle to the last row
             Row lastRow = rsi.last();
             //obtain the index of the last row
             int lastRowIndex = rsi.getRangeIndexOf(lastRow);
             //create a new row
             Row newRow = rsi.createRow();
             newRow.setAttribute("CountryId", newValue);
             //initialize the row
             newRow.setNewRowState(Row.STATUS_INITIALIZED);
             //add row to last index + 1 so it becomes last in the range set
             rsi.insertRowAtRangeIndex(lastRowIndex +1, newRow);
             //make row the current row so it is displayed correctly
             rsi.setCurrentRow(newRow);

    I read the reply from Andrejus Baranovskis and thought of studying and implementing that in my useCase.Well it worked . I implemented the same Logic but rowIteration was done in AppModule.
    Con-Fusion, Bugs, Facts &amp;amp; Workarounds: Iterating through View Object RowIterator Bug.(NOT ADF BUG, Development B…
    http://docs.oracle.com/cd/E15523_01/web.1111/b31974/bcservices.htm#sm0206
    9.7.6 What You May Need to Know About Programmatic Row Set Iteration
    The problem is solved ,the above links helped me solve the problem.
    what i did is i have created a method in appmodule to iterate rows and all the method y operation bindings and my logic works fine ....
    MY Advice to all Adf developers ,though i am not an expert but i can assure you to follow the above process for rowIteration.If you use the  iterator binding in the manage bean to navigate the rows u'll face issues which are unexpected.
    In AppModule :::::
        public boolean createRow(String oldValue,String newValue){
         System.err.println(oldValue+""+newValue);
          ViewObjectImpl vo=getViewObj1();
          boolean duplicate=false;
          if(oldValue!=null){
          RowSetIterator iter = vo.createRowSetIterator(null);
          System.err.println("iterating rows ");
             while (iter.hasNext()) {
                 Row r = iter.next();
                 System.err.println(iter.getRangeIndexOf(r)+" row is "+r.getAttribute("CountryId"));
                 if(r.getAttribute("CountryId").toString().equals(newValue)){
                     duplicate=true;
                     break;
                 // Do something with the current row.
             // close secondary row set iterator
             iter.closeRowSetIterator();
          return duplicate;
    In ManageBean :::::
        public void countryIdVC(ValueChangeEvent valueChangeEvent) {
            // Add event code here...
            String oldValue=null;
           System.err.println("Old Value"+valueChangeEvent.getOldValue());
              setEL("#{bindings.CountryId.inputValue}", valueChangeEvent.getOldValue());
              if(evaluateEL("#{bindings.CountryId.attributeValue}")!=null)
             oldValue =evaluateEL("#{bindings.CountryId.attributeValue}").toString();
                    setEL("#{bindings.CountryId.inputValue}", valueChangeEvent.getNewValue());
            String newValue=evaluateEL("#{bindings.CountryId.attributeValue}").toString();
            BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
             //access the name of the iterator the table is bound to. Its "allDepartmentsIterator"
             //in this sample
             DCIteratorBinding dciter = (DCIteratorBinding) bindings.get("ViewObj1Iterator");
             //access the underlying RowSetIterator
             RowSetIterator rsi = dciter.getRowSetIterator();
             if(oldValue!=null){
                          rsi.getCurrentRow().setAttribute("CountryId", oldValue);
               OperationBinding operation = bindings.getOperationBinding("createRow");
               operation.getParamsMap().put("oldValue", oldValue);
               operation.getParamsMap().put("newValue", newValue);
          if(!(Boolean)operation.execute()){
          //get handle to the last row
          Row lastRow = rsi.last();
          //obtain the index of the last row
          int lastRowIndex = rsi.getRangeIndexOf(lastRow);
          //create a new row
          Row newRow = rsi.createRow();
          newRow.setAttribute("CountryId", newValue);
          //initialize the row
          newRow.setNewRowState(Row.STATUS_INITIALIZED);
          //add row to last index + 1 so it becomes last in the range set
          System.err.println("Inserting row at index "+lastRowIndex+1);
          rsi.insertRowAtRangeIndex(lastRowIndex +1, newRow);
          //make row the current row so it is displayed correctly
          rsi.setCurrentRow(newRow);
          else{
            System.err.println("Data found So not inserting,only setting current Row");
          Key key =new Key(new Object[] { newValue});
            rsi.setCurrentRow(rsi.getRow(key));

  • I need help with event structure. I am trying to feed the index of the array, the index can vary from 0 to 7. Based on the logic ouput of a comparison, the index buffer should increment ?

    I need help with event structure.
    I am trying to feed the index of the array, the index number can vary from 0 to 7.
    Based on the logic ouput of a comparison, the index buffer should increment
    or decrement every time the output of comparsion changes(event change). I guess I need to use event structure?
    (My event code doesn't execute when there is an  event at its input /comparator changes its boolean state.
    Anyone coded on similar lines? Any ideas appreciated.
    Thanks in advance!

    You don't need an Event Structure, a simple State Machine would be more appropriate.
    There are many examples of State Machines within this forum.
    RayR

  • I need help with my mapping - CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV

    hi, guys, i need help with my mapping, i dont know this error (i not speak english)
    <Trace level="1" type="B">CL_MAPPING_XMS_PLSRV3-ENTER_PLSRV</Trace>
    <Trace level="2" type="T">......attachment XI_Context not found </Trace>
    <Trace level="3" type="T">Mapping already defined in interface determination </Trace>
    <Trace level="3" type="T">Object ID of Interface Mapping 4B903E2DDC853C1493E1DED5C5ED70A3 </Trace>
    <Trace level="3" type="T">Version ID of Interface Mapping 88D96A70BAAE11DFAE5EE925C0A800C2 </Trace>
    <Trace level="1" type="T">Mapping-Object-Id:4B903E2DDC853C1493E1DED5C5ED70A3 </Trace>
    <Trace level="1" type="T">Mapping-SWCV:88D96A70BAAE11DFAE5EE925C0A800C2 </Trace>
    <Trace level="1" type="T">Mapping-Step:1 </Trace>
    <Trace level="1" type="T">Mapping-Type:JAVA_JDK </Trace>
    <Trace level="1" type="T">Mapping-Program:com/sap/xi/tf/_mm_sgipi_fi001_vta_clientes_ </Trace>
    <Trace level="3" type="T">MTOM Attachments Are Written to the Payload </Trace>
    <Trace level="3" type="T">Dynamic Configuration Is Empty </Trace>
    <Trace level="3" type="T">Executing multi-mapping </Trace>
    <Trace level="1" type="E">CL_XMS_PLSRV_MAPPING~ENTER_PLSRV</Trace>
    help me please

    you can use the sharedobject to record a user/computer has taken your quiz, the session data and record their results.  at the start of your quiz, check for the sharedobject and, if it exists, check the other data and take appropriate action.

  • Need help with a query

    Hi,
    I need help with the following query. I want the balance (bal) with the latest exchange rate available.
    Sample table & data
    with
    FX_RATE as
    select 11 as id_date, 1 as id_curr, 47 as EXCH_rate from dual union
    select 12, 1, 48 from dual union
    select 13, 2, 54 from dual union
    select 14, 2, 55 from dual union
    select 15, 3, 56 from dual union
    select 15, 2, 49 from dual),
    TBL_NM as
    select 13 as p_date, 2 as p_curr, 200 as bal from dual union
    select 14, 2, 200 from dual union
    select 15, 2, 200 from dual union
    select 16, 2, 200 from dual union
    select 17, 2, 200 from dual union
    select 11, 5, 100 from dual
    select p_date, p_curr, bal * nvl(exch_rate,1) from TBL_NM T LEFT OUTER JOIN FX_RATE F1 on (id_curr = p_curr and F1.id_date = T.p_Date)In the above query for p_date 16 & 17 and p_curr 2 it returns just balance multiplied by exchange rate 1"default". But i want the balance to have data as per latest exchange rate which is of exchange rate 15.
    I tried this but returns error ORA-01799: a column may not be outer joined to a subquery ..
    with
    FX_RATE as
    select 11 as id_date, 1 as id_curr, 47 as EXCH_rate from dual union
    select 12, 1, 48 from dual union
    select 13, 2, 54 from dual union
    select 14, 2, 55 from dual union
    select 15, 3, 56 from dual union
    select 15, 2, 49 from dual),
    TBL_NM as
    select 13 as p_date, 2 as p_curr, 200 as bal from dual union
    select 14, 2, 200 from dual union
    select 15, 2, 200 from dual union
    select 16, 2, 200 from dual union
    select 17, 2, 200 from dual union
    select 11, 5, 100 from dual
    select p_date, p_curr, bal * nvl(exch_rate,1) from TBL_NM T LEFT OUTER JOIN FX_RATE F1
    on (id_curr = p_curr and F1.id_date = (select max(F2.id_date) from FX_RATE F2 where F2.id_curr = T.p_curr and F2.id_Date <=  T.p_date))Please advice on how i can achieve this ..

    The entire query wud be like this .. I've to incorporate in here
    CREATE MATERIALIZED VIEW MV_DUMMY
    BUILD IMMEDIATE
    REFRESH FORCE ON DEMAND
    AS
        SELECT T.ID_TSACTION_RELEASED                                                                                
        BAL.ID_CONTRACT_BALANCE                                                                                                                                                                                                                                                                           AS ID_CONTRACT_BALANCE,   
        T.N_REFERENCE_NUMBER                                                                                          
        T.INSTRUMENT_N_REFERENCE                                                                                      
        T.ITEM_NUMBER                                                                                                   
        T.EXTERNAL_SYSTEM_ID                                                                                            
        T.SEQUENCE_NUMBER                                                                                               
        T.ID_RELEASED_DATE                                                                                              
       ROUND(BAL.LC_AVAILABLE_BALANCE * NVL(FX1.EXCHANGE_RATE,1) / NVL(FX2.EXCHANGE_RATE,1) , 4)                           
        BAL.LIABILITY_BALANCE                                                                                              
        BAL.LIABILITY_BALANCE * NVL(FX3.EXCHANGE_RATE,1)                                                                   
        BAL.LIABILITY_CHANGE_USD                                                                                           
        BAL.MEMO_LIABILITY_BALANCE                                                                                         
        BAL.MEMO_LIABILITY_BALANCE * NVL(FX3.EXCHANGE_RATE,1)                                                              
        BAL.MEMO_LIABILITY_CHANGE_USD                                                                                      
        BAL.ORIGINAL_FACE_AMOUNT                                                                                           
        decode(T.TENOR_CODE,'Time','T','Sight','S','Split Sight Time','SST','Split Multiple Time','SMT',T.TENOR_CODE)
        CASE
          WHEN GTSPROD.PRODUCT_CATEGORY IN ('ILC','IB','AIR','STG','NLC','NP')
          THEN T.ID_LIABILITY_CIF
          WHEN GTSPROD.PRODUCT_CATEGORY IN ('ELC','EB','XLC','XP','EC','LN','SCF-AR')
          THEN T.Id_Beneficiary
          WHEN GTSPROD.PRODUCT_CATEGORY IN ('TLC','IC','OA','SCF-AP')
          THEN T.ID_Applicant
        END PRIMARY_CUSTOMER_ID,
        CASE
          WHEN GTSPROD.PRODUCT_CATEGORY IN ('ILC','IB','AIR','STG','NLC','NP')
          THEN plbcif.EXTERNAL_SYSTEM_ID
          WHEN GTSPROD.PRODUCT_CATEGORY IN ('ELC','EB','XLC','XP','EC','LN','SCF-AR')
          THEN PBCIF.EXTERNAL_SYSTEM_ID
          WHEN GTSPROD.PRODUCT_CATEGORY IN ('TLC','IC','OA','SCF-AP')
          THEN pappcif.EXTERNAL_SYSTEM_ID
        END PRIMARY_CUSTOMER_EXT_SYS_ID,
        CASE
          WHEN GTSPROD.PRODUCT_CATEGORY IN ('ILC','IB','AIR','STG','NLC','NP')
          THEN plbcif.CIF_NAME
          WHEN GTSPROD.PRODUCT_CATEGORY IN ('ELC','EB','XLC','XP','EC','LN','SCF-AR')
          THEN PBCIF.CIF_NAME
          WHEN GTSPROD.PRODUCT_CATEGORY IN ('TLC','IC','OA','SCF-AP')
          THEN pappcif.CIF_NAME
        END PRIMARY_CUSTOMER_NAME,
        CASE
          WHEN GTSPROD.PRODUCT_CATEGORY IN ('ILC','IB','AIR','STG','NLC','NP')
          THEN plbbac.BAC
          WHEN GTSPROD.PRODUCT_CATEGORY IN ('ELC','EB','XLC','XP','EC','LN','SCF-AR')
          THEN pbbac.BAC
          WHEN GTSPROD.PRODUCT_CATEGORY IN ('TLC','IC','OA','SCF-AP')
          THEN pappbac.BAC
        END PRIMARY_CUST_BAC_CODE,
        CASE
          WHEN GTSPROD.PRODUCT_CATEGORY IN ('ILC','IB','AIR','STG','NLC','NP')
          THEN nvl(plbmg.MARKET,'NOT APPLICABLE')
          WHEN GTSPROD.PRODUCT_CATEGORY IN ('ELC','EB','XLC','XP','EC','LN','SCF-AR')
          THEN nvl(pbmg.MARKET,'NOT APPLICABLE')
          WHEN GTSPROD.PRODUCT_CATEGORY IN ('TLC','IC','OA','SCF-AP')
          THEN nvl(pappmg.MARKET,'NOT APPLICABLE')
        END PRIMARY_CUST_MARKET,
        CASE
          WHEN GTSPROD.PRODUCT_CATEGORY IN ('ILC','IB','AIR','STG','NLC','NP')
          THEN nvl(plbmg.SUB_MARKET,'NOT APPLICABLE')
          WHEN GTSPROD.PRODUCT_CATEGORY IN ('ELC','EB','XLC','XP','EC','LN','SCF-AR')
          THEN nvl(pbmg.SUB_MARKET,'NOT APPLICABLE')
          WHEN GTSPROD.PRODUCT_CATEGORY IN ('TLC','IC','OA','SCF-AP')
          THEN nvl(pappmg.SUB_MARKET,'NOT APPLICABLE')
        END PRIMARY_CUST_SUB_MARKET
      FROM F_TSACTION_RELEASED T
      LEFT OUTER JOIN D_BAC_CODE BAC
      ON (T.BAC_CODE_LIABILITY = BAC.BAC_CODE)
      LEFT OUTER JOIN REF_BAC_SORT_CODE REF_BAC
      ON (T.BAC_CODE_LIABILITY = REF_BAC.BAC)
      LEFT OUTER JOIN F_CONTRACT_BALANCE BAL
      ON (T.ID_TSACTION_RELEASED = BAL.ID_TSACTION_RELEASED)
      LEFT OUTER JOIN D_MARKET_SEGMENT MG
      ON (T.ID_MARKET_SEGMENT = MG.ID_MARKET_SEGMENT)
      LEFT OUTER JOIN D_DATE DT
      ON (DT.ID_DATE = T.ID_RELEASED_DATE)
      LEFT OUTER JOIN D_DATE DB
      ON (DB.ID_DATE = BAL.ID_RELEASED_DATE)
      LEFT OUTER JOIN D_PROCESSING_UNIT PU
      ON (PU.ID_PROCESSING_UNIT = T.ID_PROCESSING_UNIT)
      LEFT OUTER JOIN D_BIR_PRODUCT BIRPROD
      ON (BIRPROD.ID_BIR_PRODUCT=T.ID_BIR_PRODUCT)
      LEFT OUTER JOIN D_GTS_PRODUCT_TYPE GTSPROD
      ON (GTSPROD.ID_GTS_PRODUCT_TYPE= T.ID_GTS_PRODUCT_TYPE)
      LEFT OUTER JOIN D_GTS_TSACTION_TYPE GTST
      ON (GTST.ID_GTS_TSACTION_TYPE = T.ID_GTS_TSACTION_TYPE)
      LEFT OUTER JOIN D_CURRENCY CCYT
      ON (CCYT.ID_CURRENCY = T.ID_TSACTION_CURRENCY)
      LEFT OUTER JOIN d_cif lcif
      ON (lcif.id_cif = T.id_liability_cif)
      LEFT OUTER JOIN d_cif lbcif
      ON (lbcif.id_cif = bal.id_liability_cif)
      LEFT OUTER JOIN d_cif bcif
      ON (bcif.id_cif = T.id_BENEFICIARY)
      LEFT OUTER JOIN d_cif icif
      ON (icif.id_cif = T.id_ISSUING_BANK)
      LEFT OUTER JOIN d_cif acif
      ON (acif.id_cif = T.id_ADVISING_BANK)
      LEFT OUTER JOIN d_cif appcif
      ON (appcif.id_cif = T.id_applicant)
      LEFT OUTER JOIN d_state astate
      ON (astate.id_state = acif.id_state)
      LEFT OUTER JOIN d_state bstate
      ON (bstate.id_state = bcif.id_state)
      LEFT OUTER JOIN d_state lstate
      ON (lstate.id_state = lcif.id_state)
      LEFT OUTER JOIN d_state lbstate
      ON (lbstate.id_state = lbcif.id_state)
      LEFT OUTER JOIN d_state istate
      ON (istate.id_state = icif.id_state)
      LEFT OUTER JOIN d_state appstate
      ON (appstate.id_state = appcif.id_state)
      LEFT OUTER JOIN D_TSACTION_SOURCE TSrc
      ON (T.ID_TSACTION_SOURCE = TSrc.ID_TSACTION_SOURCE)
      LEFT OUTER JOIN D_COUNTRY LCTRY
      ON (LCTRY.ID_COUNTRY = lcif.ID_COUNTRY)
      LEFT OUTER JOIN D_COUNTRY LBCTRY
      ON (LBCTRY.ID_COUNTRY = lbcif.ID_COUNTRY)
      LEFT OUTER JOIN D_COUNTRY BCTRY
      ON (BCTRY.ID_COUNTRY = bcif.ID_COUNTRY)
      LEFT OUTER JOIN D_COUNTRY ICTRY
      ON (ICTRY.ID_COUNTRY = icif.ID_COUNTRY)
      LEFT OUTER JOIN D_COUNTRY ACTRY
      ON (ACTRY.ID_COUNTRY = acif.ID_COUNTRY)
      LEFT OUTER JOIN D_COUNTRY APPCTRY
      ON (APPCTRY.ID_COUNTRY = appcif.ID_COUNTRY)
      LEFT OUTER JOIN D_COUNTRY PCTRY
      ON (PCTRY.ID_COUNTRY = T.ID_PRESENTER_COUNTRY)
      LEFT OUTER JOIN D_LOCATION LOC
      ON (LOC.ID_LOCATION = T.ID_PROCESSING_LOCATION)
      LEFT OUTER JOIN D_CURRENCY BCCYT
      ON (BCCYT.ID_CURRENCY = BAL.ID_LIABILITY_CURRENCY)
      LEFT OUTER JOIN D_CURRENCY BALCYT
      ON (BALCYT.ID_CURRENCY = BAL.ID_BALANCE_CURRENCY)
      LEFT OUTER JOIN d_liability_type li
      ON (li.id_liability_type = BAL.id_liability_type)
      LEFT OUTER JOIN d_cif plbcif
      ON (plbcif.id_cif = T.id_liability_cif)
      LEFT OUTER JOIN REF_BAC_SORT_CODE plbbac
      ON (plbcif.bac_code=plbbac.bac)
      LEFT OUTER JOIN D_MARKET_SEGMENT plbmg
      ON (plbbac.SORT_CODE=plbmg.MARKET_SEGMENT)
      LEFT OUTER JOIN d_cif pbcif
      ON (pbcif.id_cif = T.id_BENEFICIARY)
      LEFT OUTER JOIN REF_BAC_SORT_CODE pbbac
      ON (pbcif.bac_code=pbbac.bac)
      LEFT OUTER JOIN D_MARKET_SEGMENT pbmg
      ON (pbbac.SORT_CODE=pbmg.MARKET_SEGMENT)
      LEFT OUTER JOIN d_cif pappcif
      ON (pappcif.id_cif = T.id_applicant)
      LEFT OUTER JOIN REF_BAC_SORT_CODE pappbac
      ON (pappcif.bac_code=pappbac.bac)
      LEFT OUTER JOIN D_MARKET_SEGMENT pappmg
      ON (pappbac.SORT_CODE=pappmg.MARKET_SEGMENT)
      LEFT OUTER JOIN D_CURRENCY LOCALCYT
      ON (LOCALCYT.alpha_code = PU.local_ccy)
      LEFT OUTER JOIN D_BRANCH Branch              
      ON (T.ID_BRANCH  = Branch.ID_BRANCH )
      LEFT OUTER JOIN F_USD_FX_RATE_HISTORY FX1
      ON (BAL.ID_BALANCE_CURRENCY = FX1.ID_CURRENCY and FX1.ID_DATE = (select max(FX11.ID_DATE) from F_USD_FX_RATE_HISTORY FX11 where BAL.ID_BALANCE_CURRENCY = FX11.ID_CURRENCY and FX11.ID_DATE <= BAL.id_released_date))
      LEFT OUTER JOIN F_USD_FX_RATE_HISTORY FX2
      ON (LOCALCYT.ID_CURRENCY = FX2.ID_CURRENCY and FX2.ID_DATE = (select max(FX22.ID_DATE) from F_USD_FX_RATE_HISTORY FX22 where LOCALCYT.ID_CURRENCY = FX22.ID_CURRENCY and FX22.ID_DATE <= BAL.id_released_date))
      LEFT OUTER JOIN F_USD_FX_RATE_HISTORY FX3
      ON (BAL.ID_LIABILITY_CURRENCY = FX3.ID_CURRENCY and FX3.ID_DATE = (select max(FX33.ID_DATE) from F_USD_FX_RATE_HISTORY FX33 where BAL.ID_LIABILITY_CURRENCY = FX33.ID_CURRENCY and FX33.ID_DATE <= BAL.id_released_date))Note the lines
    ROUND(BAL.MN_AVAILABLE_BALANCE * NVL(FX1.EXCHANGE_RATE,1) / NVL(FX2.EXCHANGE_RATE,1) , 4)                           
    BAL.LIABILITY_BALANCE * NVL(FX3.EXCHANGE_RATE,1)                                                                   
    BAL.MEMO_LIABILITY_BALANCE * NVL(FX3.EXCHANGE_RATE,1)                 
    And
    LEFT OUTER JOIN F_USD_FX_RATE_HISTORY FX1
      ON (BAL.ID_BALANCE_CURRENCY = FX1.ID_CURRENCY and FX1.ID_DATE = (select max(FX11.ID_DATE) from F_USD_FX_RATE_HISTORY FX11 where BAL.ID_BALANCE_CURRENCY = FX11.ID_CURRENCY and FX11.ID_DATE <= BAL.id_released_date))
      LEFT OUTER JOIN F_USD_FX_RATE_HISTORY FX2
      ON (LOCAMNYT.ID_CURRENCY = FX2.ID_CURRENCY and FX2.ID_DATE = (select max(FX22.ID_DATE) from F_USD_FX_RATE_HISTORY FX22 where LOCAMNYT.ID_CURRENCY = FX22.ID_CURRENCY and FX22.ID_DATE <= BAL.id_released_date))
      LEFT OUTER JOIN F_USD_FX_RATE_HISTORY FX3
      ON (BAL.ID_LIABILITY_CURRENCY = FX3.ID_CURRENCY and FX3.ID_DATE = (select max(FX33.ID_DATE) from F_USD_FX_RATE_HISTORY FX33 where BAL.ID_LIABILITY_CURRENCY = FX33.ID_CURRENCY and FX33.ID_DATE <= BAL.id_released_date))Thsi is where I need to incorporate the change

  • Need help with threads?.. please check my approach!!

    Hello frnds,
    I am trying to write a program.. who monitors my external tool.. please check my way of doing it.. as whenever i write programs having thread.. i end up goosy.. :(
    first let me tell.. what I want from program.. I have to start an external tool.. on separate thread.. (as it takes some time).. then it takes some arguments(3 arguments).. from file.. so i read the file.. and have to run tool.. continously.. until there are arguments left.. in file.. or.. user has stopped it by pressing STOP button..
    I have to put a marker in file too.. so that.. if program started again.. file is read from marker postion.. !!
    Hope I make clear.. what am trying to do!!
    My approach is like..
    1. Have two buttons.. START and STOP on Frame..
    START--> pressed
    2. check marker("$" sign.. placed in beginning of file during start).. on file..
         read File from marker.. got 3 arg.. pass it to tool.. and run it.. (on separate thread).. put marker.. (for next reading)
         Step 2.. continously..
    3. STOP--> pressed
         until last thread.. stops.. keep running the tool.. and when last thread stops.. stop reading any more arguments..
    Question is:
    1. Should i read file again and again.. ?.. or read it once after "$" sign.. store data in array.. and once stopped pressed.. read file again.. and put marker ("$" sign) at last read line..
    2. how should i know when my thread has stopped.. so I start tool again??.. am totally confused.. !!
    please modify my approach.. if u find anything odd..
    Thanks a lot in advance
    gervini

    Hello,
    I have no experience with threads or with having more than run "program" in a single java file. All my java files have the same structure. This master.java looks something like this:
    ---master.java---------------------------------------------------
    import java.sql.*;
    import...
    public class Master {
    public static void main(String args []) throws SQLException, IOException {
    //create connection pool here
    while (true) { // start loop here (each loop takes about five minutes)
    // set values of variables
    // select a slave process to run (from a list of slave programs)
    execute selected slave program
    // check for loop exit value
    } // end while loop
    System.out.println("Program Complete");
    } catch (Exception e) {
    System.out.println("Error: " + e);
    } finally {
    if (rSet1 != null)
    try { rSet1.close(); } catch( SQLException ignore ) { /* ignored */ }
    connection.close();
    -------end master.java--------------------------------------------------------
    This master.java program will run continuously for days or weeks, each time through the loop starting another slave process which runs for five minutes to up to an hour, which means there may be ten to twenty of these slave processes running simultaneously.
    I believe threads is the best way to do this, but I don't know where to locate these slave programs: either inside the master.java program or separate slave.java files? I will need help with either method.
    Your help is greatly appreciated. Thank you.
    Logan

  • Need help with writing a rule

    Need help with some rules. I want to book a number to a specific Entity at a Specific Custom 4 only. I don't want this formula to work at all C4 levels. How can this be done?
    for example if Entity is "XBM1123" and we use C4 for tracking and the tracking level I want to book it to is IMPORT, how can this be done for a specific account 4400221
    I have my formula as
    If pov_value = "<Entity Currency>" or pov_value = "<Entity Curr Adjs>" Then
    If HS.Entity.Member = "XBM1123" or HS.Custom4.Member = "IMPORT" then
    HS.EXP "A#4400221= A#4521111 + A#3526644 + A#635210"
    End If
    End if
    this did not work. I got hte following error
    Calculate started.<BR>Error executing VBScript Microsoft VBScript runtime
    error, Line 259:Object doesn't support this property or method:
    'HS.Custom4.Member'.<BR>Calculate finished.<BR>Error executing
    VBScript %0.
    I then changed it to the below and it still did not work
    If pov_value = "<Entity Currency>" or pov_value = "<Entity Curr Adjs>" Then
    If HS.Entity.Member = "XBM1123" then
    HS.EXP "A#4400221.C4#IMPORT= A#4521111 + A#3526644 + A#635210"
    End If
    End if
    error
    Invalid Custom1 member
    specified for this function.
    Invalid Destination specified for this function:
    A#4400221.C4#IMPORT.

    You are close.
    Try:
    If pov_value = "<Entity Currency>" or pov_value = "<Entity Curr Adjs>" Then
        If HS.Entity.Member = "XBM1123" then
           HS.EXP "A#4400221.C4#IMPORT= A#4521111.C4#IMPORT + A#3526644.C4#IMPORT + A#635210.C4#IMPORT"
        End If
    End if
    or replace IMPORT with with Top_C4 or what ever member you need to copy to C4#IMPORT.
    Rule of thumb, to be on the safe side and for most simple calcs, is if you mention a dimension on the left side, you need to define it on the right side as well.

  • Pipelined Function with execute immediate

    Hello Experts,
    I have created a Pipe lined function with execute immediate, due to below requirement;
    1) Columns in where clause is passed dynamically.
    2) I want to know the data stored into above dynamic columns.
    3) I want to use it in report, so I don't want to insert it into a table.
    I have created a TYPE, then through execute immediate i have got the query and result of that query will be stored in TYPE.
    But when calling the function i am getting
    ORA-00932: inconsistent datatypes: expected - got -
    Below is my function and type, let me know i am going wrong, and is my logic correct.
    CREATE OR REPLACE TYPE OBJ_FPD AS OBJECT
                      (LOW_PLAN_NO VARCHAR2 (40),
                       FPD VARCHAR2 (5),
                       SERIAL_NO NUMBER,
                       CEDIA_CODE VARCHAR2 (2),
                       DT DATE);
    CREATE OR REPLACE TYPE FPD_TBL_TYPE AS TABLE OF OBJ_FPD;
    CREATE OR REPLACE FUNCTION FUNC_GET_FPD_DATE (P_LOW_PLAN_NO    VARCHAR2,
                                                  P_CEDIA_CODE     VARCHAR2,
                                                  P_SERIAL_NO      NUMBER)
       RETURN FPD_TBL_TYPE
       PIPELINED
    AS
       CURSOR C1
       IS
              SELECT 'FPD' || LEVEL TBL_COL
                FROM DUAL
          CONNECT BY LEVEL <= 31;
       V_STR        VARCHAR2 (5000);
       V_TBL_TYPE   FPD_TBL_TYPE;
    BEGIN
       FOR X IN C1
       LOOP
          V_STR :=
                'SELECT A.low_PLAN_NO,
               A.FPD,
               A.SERIAL_NO,
               A.cedia_code,
               TO_DATE (
                     SUBSTR (FPD, 4, 5)
                  || ''/''
                  || TO_CHAR (C.low_PLAN_PERIOD_FROM, ''MM'')
                  || ''/''
                  || TO_CHAR (C.low_PLAN_PERIOD_FROM, ''RRRR''),
                  ''DD/MM/RRRR'')
                  DT FROM ( SELECT low_PLAN_NO, '
             || ''''
             || X.TBL_COL
             || ''''
             || ' FPD, '
             || X.TBL_COL
             || ' SPTS, SERIAL_NO, cedia_code FROM M_low_PLAN_DETAILS WHERE NVL('
             || X.TBL_COL
             || ',0) > 0 AND SERIAL_NO = '
             || P_SERIAL_NO
             || ' AND cedia_code = '
             || ''''
             || P_CEDIA_CODE
             || ''''
             || ' AND low_PLAN_NO = '
             || ''''
             || P_LOW_PLAN_NO
             || ''''
             || ') A,
               M_low_PLAN_DETAILS B,
               M_low_PLAN_MSTR C
         WHERE     A.low_PLAN_NO = B.low_PLAN_NO
               AND A.cedia_code = B.cedia_code
               AND A.SERIAL_NO = B.SERIAL_NO
               AND B.low_PLAN_NO = C.low_PLAN_NO
               AND B.CLIENT_CODE = C.CLIENT_CODE
               AND B.VARIANT_CODE = C.VARIANT_CODE
    CONNECT BY LEVEL <= SPTS';
          EXECUTE IMMEDIATE V_STR INTO V_TBL_TYPE;
          FOR I IN 1 .. V_TBL_TYPE.COUNT
          LOOP
             PIPE ROW (OBJ_FPD (V_TBL_TYPE (I).LOW_PLAN_NO,
                                V_TBL_TYPE (I).FPD,
                                V_TBL_TYPE (I).SERIAL_NO,
                                V_TBL_TYPE (I).CEDIA_CODE,
                                V_TBL_TYPE (I).DT));
          END LOOP;
       END LOOP;
       RETURN;
    EXCEPTION
       WHEN OTHERS
       THEN
          RAISE_APPLICATION_ERROR (-20000, SQLCODE || ' ' || SQLERRM);
          RAISE;
    END;Waiting for your views.
    Regards,

    Ora Ash wrote:
    Hello Experts,
    I have created a Pipe lined function with execute immediate, due to below requirement;
    1) Columns in where clause is passed dynamically.No, that's something you've introduced, and is due to poor database design. You appear to have columns on your table called FPD1, FPD2 ... FPD31. The columns do not need to be 'passed dynamically'
    2) I want to know the data stored into above dynamic columns.And you can know the data without it being dynamic.
    3) I want to use it in report, so I don't want to insert it into a table.That's fine, though there's no reason to use a pipelined function.
    You also have an pointless exception handler, which masks any real errors.
    I'm not quite sure what the point of your "connect by" is in your query as we don't have your tables or data or know for sure what the expected output is.
    However, in terms of handling the 'dynamic' part that you've introduced, then you would be looking at doing something along the following lines, using a static query that requires no poor dynamic code, and no pipelined function...
    with x as (select level as dy from dual connect by level <= 31)
    select a.low_plan_no
          ,a.fpd
          ,a.serial_no
          ,a.cedia_code
          ,trunc(c.low_plan_period_from)+a.dy-1 as dt
    from  (select low_plan_no
                 ,dy
                 ,'FPD'||dy as fpd
                 ,spts
                 ,serial_no
                 ,cedia_code
           from (
                 select low_plan_no
                       ,x.dy
                       ,case x.dy when 1 then fpd1
                                  when 2 then fpd2
                                  when 3 then fpd3
                                  when 4 then fpd4
                                  when 5 then fpd5
                                  when 6 then fpd6
                                  when 7 then fpd7
                                  when 8 then fpd8
                                  when 9 then fpd9
                                  when 10 then fpd10
                                  when 11 then fpd11
                                  when 12 then fpd12
                                  when 13 then fpd13
                                  when 14 then fpd14
                                  when 15 then fpd15
                                  when 16 then fpd16
                                  when 17 then fpd17
                                  when 18 then fpd18
                                  when 19 then fpd19
                                  when 20 then fpd20
                                  when 21 then fpd21
                                  when 22 then fpd22
                                  when 23 then fpd23
                                  when 24 then fpd24
                                  when 25 then fpd25
                                  when 26 then fpd26
                                  when 27 then fpd27
                                  when 28 then fpd28
                                  when 29 then fpd29
                                  when 30 then fpd30
                                  when 31 then fpd31
                        else null
                        end as spts
                       ,serial_no
                       ,cedia_code
                 from   x cross join m_low_plan_details
                 where  serial_no = p_serial_no
                 and    cedia_code = p_cedia_code
                 and    low_plan_no = p_low_plan_no
           where  nvl(spts,0) > 0
          ) A
          join m_low_plan_details B on (    A.low_plan_no = B.low_plan_no
                                        and A.cedia_code = B.cedia_code
                                        and A.serial_no = B.serial_no
          join m_low_plan_mstr C on (    B.low_plan_no = C.low_plan_no
                                     and B.client_code = C.client_code
                                     and B.variant_code = C.variant_code
    connect by level <= spts;... so just remind us again why you think it needs to be dynamic?

  • Disadvantage with 'Execute Immediate'

    What is the disadvantage with 'EXECUTE IMMEDIATE'.

    I think you guys are missing the point here.
    None of the issues listed are 'EXECUTE IMMEDIATE' disadvantages.
    'EXECUTE IMMEDIATE' is a tool. Like DMS_SQL. Like ref cursors. Like explicit cursor. Like implicit cursors.
    A tool, any tool, needs to be used correctly. If you use a hammer and hit a nail so hard that it bents, causing the hammer to slip doing some serious damage to your thumb... whose fault it is?
    Is it The Hammer that is at fault here? Or is the user of that tool?
    There are no disadvantages to using 'EXECUTE IMMEDIATE'. It is a tool. But like all tools it needs to be used correctly and safely. Things like excessive hard parsing because of a severe lack of bind variables, or opening a hole for SQL injection, etc.. all these are symptoms of - and let's be blunt here - an ignorant developer. It has nothing to do with the tool 'EXECUTE IMMEDIATE'.
    And those same type of errors will be made by Mr Ignorant Developer using other tools in Oracle.
    Shoddy workmanship is not because of poor tools. Shoddy code is not because of using a specific feature (like execute immediate).
    The proper question to ask is thus not "what are the disadvantages of execute immediate", but rather "where should I typically use execute immediate and how?".
    Not every developer will know how to use every single tool in the toolbox (I sure don't know all the tools in the Oracle toolbox). So there is nothing wrong with asking.
    But asking what is "wrong" with a tool (aka "what are the disadvantages") is in my view seriously missing the point that a tool is there to solve very specific types of problems...
    That is what a developer should be after - How to use the tool correctly.

  • Execute a DML query its length exceeds 4000 characters with execute immediate statement.

    I want to execute a DML query with execute immediate statement. That DML query length exceeds 4000 characters. This query has Xquery related conditions, i can not split the query. when i tried execute it is giving "string literal too long".  I tried with DBMS_SQL.Parse() and DBMS_SQL.Execute also, but it is giving same error. I have to execute this DML query inside a Procedure. Please help me to resolve this. We are using oracle 10g version
    Thanks & Regards,
    K.Kedarnadh

    Actually Query is a dynamic query. Query length will exceeds if the no of domains\domain values \products exceeds. Any way Below one is current dynamic query, which is generated within procedure
    SELECT
      IVT.ID_IVT
        ,IVT.ID_INS_IVT
      ,EXTRACTVALUE(IVT.DOCUMENT_IVT,'//productName/text()') AS PRODUCTNAME
      ,EXTRACTVALUE(IVT.DOCUMENT_IVT,'//elementName/text()') AS INSTANCENAME
      ,EXTRACTVALUE(IVT.DOCUMENT_IVT,'//elementInternalName/text()') AS INTERNALNAME
        ,CTG.NAME_CTG
        ,CTR.NAME_CTR
        ,MDL.NAME_MDL
      ,IVT.REEDIT_FLAG_IVT
        FROM  VARIATION_IVT IVT INNER JOIN CATEGORY_CTG CTG ON CTG.ID_CTG=IVT.ID_CTG_IVT
      AND IVT.STATUS_IVT='Active' AND IVT.DELETE_FLAG_IVT=0 AND IVT.ID_PRJ_IVT=1
      AND  IVT.DOCUMENT_IVT.existsnode('.//domain[domainName="Jurisdictions" and (domainValue="Delhi" or domainValue="Bangladesh" or domainValue="Mumbai" or domainValue="India" or domainValue="Pakistan" or domainValue="Nepal" or domainValue="Maldives" or domainValue="Kolkata" or domainValue="Bhutan" or domainValue="Chennai" or domainValue="ALL")]')=1 AND  IVT.DOCUMENT_IVT.existsnode('.//domain[domainName="Channels" and (domainValue="Agents" or domainValue="SBI" or domainValue="Maruti" or domainValue="Direct" or domainValue="CitiFinancial" or domainValue="SCB" or domainValue="BankAssurance" or domainValue="CitiBank" or domainValue="Employees" or domainValue="GE" or domainValue="Brokers" or domainValue="Telemarketing" or domainValue="Agency" or domainValue="ALL")]')=1 AND  IVT.DOCUMENT_IVT.existsnode('.//domain[domainName="ModeofDelivery" and (domainValue="Walkin" or domainValue="Internet" or domainValue="ALL")]')=1 AND  IVT.DOCUMENT_IVT.existsnode('.//context[(productName="ALL" or productName="A009" or productName="A010" or productName="A046" or productName="AccidentShieldClassic" or productName="AccidentShieldOnline" or productName="AM01" or productName="AM02" or productName="AME_Cancellation" or productName="ARHG" or productName="ARPA" or productName="B003" or productName="B004" or productName="B007" or productName="B008" or productName="B009" or productName="B010" or productName="B012" or productName="B013" or productName="B015" or productName="B016" or productName="B017" or productName="BC04_PA" or productName="BC06_FDP" or productName="BC06_PA" or productName="BC09" or productName="BC10" or productName="BC12" or productName="BC13" or productName="BF03" or productName="BS01" or productName="BS02" or productName="C017" or productName="C035" or productName="C036" or productName="C037" or productName="C038" or productName="C040" or productName="C041" or productName="C041Gold" or productName="C041New" or productName="C045HomeContents" or productName="C048" or productName="C049" or productName="C054" or productName="C057" or productName="C060Building" or productName="C060Contents" or productName="C060FDP" or productName="C061Building" or productName="C061Contents" or productName="C062" or productName="C063" or productName="C067" or productName="C070" or productName="C072" or productName="C074" or productName="C077" or productName="C081" or productName="C082" or productName="C087" or productName="C088" or productName="CITIFOREVER" or productName="CITISECURE" or productName="CITICHILDPLAN" or productName="D001" or productName="DB01" or productName="DD01" or productName="DD02" or productName="DD03" or productName="DD04" or productName="DD09" or productName="DD10" or productName="E005" or productName="E011" or productName="E016" or productName="E020" or productName="E030" or productName="E034" or productName="E040" or productName="E041" or productName="E045HCP" or productName="E045HSP" or productName="E049" or productName="E049New" or productName="E052" or productName="E053" or productName="E054FDP" or productName="E055" or productName="E056" or productName="E057" or productName="E058" or productName="E061" or productName="E061BATCH" or productName="E062" or productName="E063" or productName="E064HCP" or productName="E064HSP" or productName="E066" or productName="E069" or productName="E073" or productName="E075" or productName="E076" or productName="E088" or productName="E090" or productName="E093A" or productName="E093B" or productName="E095" or productName="E099A" or productName="E099B" or productName="E106" or productName="E107" or productName="E110" or productName="E112" or productName="E114" or productName="E115" or productName="E116" or productName="F001" or productName="FamilyHealthInsurance" or productName="FamilyHospitalBenefits" or productName="FamilyHospitalisationCoverBenefit" or productName="G001" or productName="G002" or productName="HealthShieldOnline" or productName="Health_B005" or productName="Health_S057" or productName="HealthSheild" or productName="HealthWalkin" or productName="HomeContentOnline" or productName="HomeShieldOnline" or productName="HomeShieldWalkin" or productName="HospitalCashOnline" or productName="J001" or productName="J008" or productName="K001" or productName="KV02" or productName="LC03" or productName="ML01" or productName="MP02" or productName="MP03" or productName="MR01" or productName="O005" or productName="PO01" or productName="PO02" or productName="PO03" or productName="PO04" or productName="PO05" or productName="PO06" or productName="RR02" or productName="RR03" or productName="RR04" or productName="S006" or productName="S033" or productName="S049" or productName="S051" or productName="S054" or productName="S057" or productName="S060" or productName="S061" or productName="S065" or productName="S065TM" or productName="S068" or productName="S076" or productName="S077" or productName="S079" or productName="S080" or productName="S081" or productName="S084" or productName="S085" or productName="S086" or productName="S087" or productName="S088" or productName="S091" or productName="S092" or productName="S093" or productName="S094" or productName="S095" or productName="S097" or productName="S098" or productName="S099" or productName="S100" or productName="S101" or productName="S102" or productName="S103" or productName="S104" or productName="S106" or productName="S107" or productName="S108" or productName="S109" or productName="S110" or productName="S111" or productName="S113" or productName="SCBNAC" or productName="SF02" or productName="SS01" or productName="SS02" or productName="SUNFHM" or productName="SurgicalShield" or productName="TD01" or productName="TD02" or productName="TP01" or productName="U002Building" or productName="U002Contents" or productName="U004Building" or productName="U007" or productName="U009" or productName="U013" or productName="U014" or productName="U015" or productName="U016" or productName="V001" or productName="V002" or productName="V005" or productName="V006" or productName="V008" or productName="W008" or productName="W020" or productName="W021" or productName="W022" or productName="W023" or productName="W024" or productName="W026" or productName="W027" or productName="W028" or productName="W029" or productName="W105" or productName="W106" or productName="WI01" or productName="WI02" or productName="WI03" or productName="WI07" or productName="WI08" or productName="WI09" or productName="WI10" or productName="WI11" or productName="WI12" or productName="WI13" or productName="WI14" or productName="WI17" or productName="WI20" or productName="WI21" or productName="WI21_Health" or productName="WI23" or productName="WI24" or productName="WI26" or productName="WI30" or productName="WI31" or productName="WI33" or productName="WI34" or productName="X001" or productName="X002" or productName="X003" or productName="X004" or productName="X005" or productName="X008" or productName="Y001" or productName="Y007" or productName="Y009" or productName="Y010" or productName="Y011" or productName="Y011H" or productName="Y020" or productName="Y020N" or productName="Z008" or productName="ZI001")]')=1
      INNER JOIN CENTER_CTR CTR ON CTR.ID_CTR=CTG.ID_CTR_CTG
        INNER JOIN MODEL_MDL MDL ON  MDL.ID_MDL=CTR.ID_MDL_CTR

  • [SOLVED]Need help with dwm...

    Hi,
    I need help with dwm.I want to apply only 2 patches but everytime when i try i get error... I need xft or pango patch and systray patch.Please help.
    Thanks.
    Last edited by grobar87 (2013-06-01 13:49:55)

    [dejan@archtop dwm-6.0]$ patch < 00-dwm-6.0-buildflags.diff
    patching file config.mk
    [dejan@archtop dwm-6.0]$ patch < dwm-6.0-xft.diff
    patching file dwm.c
    [dejan@archtop dwm-6.0]$ patch < 02-dwm-6.0-systray.diff
    patching file dwm.c
    [dejan@archtop dwm-6.0]$ sudo make clean install
    [sudo] password for dejan:
    cleaning
    dwm build options:
    CFLAGS = -std=c99 -pedantic -Wall -Os -I. -I/usr/include -I/usr/X11R6/include -I/usr/include/freetype2 -DVERSION="6.0" -DXINERAMA -DXFT
    LDFLAGS = -s -L/usr/lib -lc -L/usr/X11R6/lib -lX11 -L/usr/X11R6/lib -lXinerama -L/usr/X11R6/lib -lXft
    CC = cc
    creating config.h from config.def.h
    CC dwm.c
    dwm.c: In function ‘keypress’:
    dwm.c:1062:2: warning: ‘XKeycodeToKeysym’ is deprecated (declared at /usr/include/X11/Xlib.h:1695) [-Wdeprecated-declarations]
    CC -o dwm
    installing executable file to /usr/local/bin
    installing manual page to /usr/local/share/man/man1
    [dejan@archtop dwm-6.0]$
    And here is my config.h:
    /* See LICENSE file for copyright and license details. */
    /* appearance */
    static const char font[] = "Ohsnap";
    static const char normbordercolor[] = "#444444";
    static const char normbgcolor[] = "#222222";
    static const char normfgcolor[] = "#bbbbbb";
    static const char selbordercolor[] = "#005577";
    static const char selbgcolor[] = "#005577";
    static const char selfgcolor[] = "#eeeeee";
    static const unsigned int borderpx = 1; /* border pixel of windows */
    static const unsigned int snap = 32; /* snap pixel */
    static const unsigned int systrayspacing = 2; /* systray spacing */
    static const Bool showsystray = True; /* False means no systray */
    static const Bool showbar = True; /* False means no bar */
    static const Bool topbar = True; /* False means bottom bar */
    /* tagging */
    static const char *tags[] = { "1", "2", "3", "4", "5", "6", "7", "8", "9" };
    static const Rule rules[] = {
    /* class instance title tags mask isfloating monitor */
    { "Gimp", NULL, NULL, 0, True, -1 },
    { "Firefox", NULL, NULL, 1 << 8, False, -1 },
    /* layout(s) */
    static const float mfact = 0.55; /* factor of master area size [0.05..0.95] */
    static const int nmaster = 1; /* number of clients in master area */
    static const Bool resizehints = True; /* True means respect size hints in tiled resizals */
    static const Layout layouts[] = {
    /* symbol arrange function */
    { "[]=", tile }, /* first entry is default */
    { "><>", NULL }, /* no layout function means floating behavior */
    { "[M]", monocle },
    /* key definitions */
    #define MODKEY Mod1Mask
    #define TAGKEYS(KEY,TAG) \
    { MODKEY, KEY, view, {.ui = 1 << TAG} }, \
    { MODKEY|ControlMask, KEY, toggleview, {.ui = 1 << TAG} }, \
    { MODKEY|ShiftMask, KEY, tag, {.ui = 1 << TAG} }, \
    { MODKEY|ControlMask|ShiftMask, KEY, toggletag, {.ui = 1 << TAG} },
    /* helper for spawning shell commands in the pre dwm-5.0 fashion */
    #define SHCMD(cmd) { .v = (const char*[]){ "/bin/sh", "-c", cmd, NULL } }
    /* commands */
    static const char *dmenucmd[] = { "dmenu_run", "-fn", font, "-nb", normbgcolor, "-nf", normfgcolor, "-sb", selbgcolor, "-sf", selfgcolor, NULL };
    static const char *termcmd[] = { "uxterm", NULL };
    static Key keys[] = {
    /* modifier key function argument */
    { MODKEY, XK_p, spawn, {.v = dmenucmd } },
    { MODKEY|ShiftMask, XK_Return, spawn, {.v = termcmd } },
    { MODKEY, XK_b, togglebar, {0} },
    { MODKEY, XK_j, focusstack, {.i = +1 } },
    { MODKEY, XK_k, focusstack, {.i = -1 } },
    { MODKEY, XK_i, incnmaster, {.i = +1 } },
    { MODKEY, XK_d, incnmaster, {.i = -1 } },
    { MODKEY, XK_h, setmfact, {.f = -0.05} },
    { MODKEY, XK_l, setmfact, {.f = +0.05} },
    { MODKEY, XK_Return, zoom, {0} },
    { MODKEY, XK_Tab, view, {0} },
    { MODKEY|ShiftMask, XK_c, killclient, {0} },
    { MODKEY, XK_t, setlayout, {.v = &layouts[0]} },
    { MODKEY, XK_f, setlayout, {.v = &layouts[1]} },
    { MODKEY, XK_m, setlayout, {.v = &layouts[2]} },
    { MODKEY, XK_space, setlayout, {0} },
    { MODKEY|ShiftMask, XK_space, togglefloating, {0} },
    { MODKEY, XK_0, view, {.ui = ~0 } },
    { MODKEY|ShiftMask, XK_0, tag, {.ui = ~0 } },
    { MODKEY, XK_comma, focusmon, {.i = -1 } },
    { MODKEY, XK_period, focusmon, {.i = +1 } },
    { MODKEY|ShiftMask, XK_comma, tagmon, {.i = -1 } },
    { MODKEY|ShiftMask, XK_period, tagmon, {.i = +1 } },
    TAGKEYS( XK_1, 0)
    TAGKEYS( XK_2, 1)
    TAGKEYS( XK_3, 2)
    TAGKEYS( XK_4, 3)
    TAGKEYS( XK_5, 4)
    TAGKEYS( XK_6, 5)
    TAGKEYS( XK_7, 6)
    TAGKEYS( XK_8, 7)
    TAGKEYS( XK_9, 8)
    { MODKEY|ShiftMask, XK_q, quit, {0} },
    /* button definitions */
    /* click can be ClkLtSymbol, ClkStatusText, ClkWinTitle, ClkClientWin, or ClkRootWin */
    static Button buttons[] = {
    /* click event mask button function argument */
    { ClkLtSymbol, 0, Button1, setlayout, {0} },
    { ClkLtSymbol, 0, Button3, setlayout, {.v = &layouts[2]} },
    { ClkWinTitle, 0, Button2, zoom, {0} },
    { ClkStatusText, 0, Button2, spawn, {.v = termcmd } },
    { ClkClientWin, MODKEY, Button1, movemouse, {0} },
    { ClkClientWin, MODKEY, Button2, togglefloating, {0} },
    { ClkClientWin, MODKEY, Button3, resizemouse, {0} },
    { ClkTagBar, 0, Button1, view, {0} },
    { ClkTagBar, 0, Button3, toggleview, {0} },
    { ClkTagBar, MODKEY, Button1, tag, {0} },
    { ClkTagBar, MODKEY, Button3, toggletag, {0} },

  • Need help with PV7I !

    Hello all,
    I need help with transaction PV7I...when i execute this transaction, i am able to prebook for any training , but the approver does not get any notification mail in his inbox for my prebookings..can anyone, who has used this transaction please help me out with this?

    Hi,
    For workflows to be activated you have to set the flag
    <i>SEMIN     REQUE     1     Event Generation in Web Transactions</i>
    under
    Set up Control Elements for ESS in Training node in IMG. There are 3 workflows associated with Training, PE_APPROVE1,PE_APPROVE2,PE_APPROVE3 which you have to enable as given in help..
    Regards
    Jayesh

  • Need help with getResource() problem under weblogic 6.1

    Hey all,
              I've got a serious problem that I can't figure out. This should be really
              simple - but it's alluding me. I have an ear file with a number of servlets
              inside it. This ear file also contains a resource that my servlets want to
              read from. This resource is located (within the ear file) at:
              "/content/structure/a.txt". The file contains raw ascii.
              To have my serlvet read from this file, I thought it would be as simple as:
              URL content =
              servlet.getServletContext().getResource("/content/structure/a.txt");
              // pw is an instance of PrintWriter
              pw.print(content.getContent());
              However, when I execute the above I get the following exception:
              java.lang.NullPointerException
              at
              java.net.URLConnection.stripOffParameters(URLConnection.java:1011)
              at java.net.URLConnection.getContentHandler(URLConnection.java:979)
              at java.net.URLConnection.getContent(URLConnection.java:581)
              OK, so fine - I figure that I'm new to this. The documentation for the URL
              class tells me there is another way around this. It says that rather then
              calling getContent() directly, I can open a stream on the URL and read from
              that, like so:
              URL content =
              servlet.getServletContext().getResource("/content/structure/scenario2resourc
              es.txt");
              FileInputStream fis = content.openStream();
              but when I do this I get the following different exception:
              java.lang.ClassCastException: weblogic.utils.zip.SafeZipFileInputStream^M
              at Utility.writeFileToOutput(Utility.java:134)^M
              Apparently this thing is trying to return a web-logic-specific stream (which
              is incompatible with an FileInputStream) - which I don't want to use or
              learn about since I want my stuff to work under other webservers.
              Can anyone tell me what I'm doing wrong? This should be simple.
              -john
              John Hilgedick
              WisdomTools, Inc.
              [email protected]
              

    Wenjin,
              I appreciate your response. I tried treating it as a normal InputStream -
              but it didn't make any difference. Here's what I did:
              URL content =
              servlet.getServletContext().getResource("/content/structure/scenario2resourc
              es.txt");
              InputStream is = (InputStream)content.getContent();
              And here's the exception:
              java.lang.NullPointerException^M
              at
              java.net.URLConnection.stripOffParameters(URLConnection.java:1011)^M
              at
              java.net.URLConnection.getContentHandler(URLConnection.java:979)^M
              at java.net.URLConnection.getContent(URLConnection.java:554)^M
              at java.net.URL.getContent(URL.java:807)^M
              at Utility.writeFileToOutput(Utility.java:134)^M
              You can see that it is definitely breaking somewhere in getContent().
              If you have any other ideas, I'd appreciate hearing about them.
              -john
              ----- Original Message -----
              From: "Wenjin Zhang" <[email protected]>
              Newsgroups: weblogic.developer.interest.servlet
              Sent: Wednesday, November 20, 2002 5:03 PM
              Subject: Re: Need help with getResource() problem under weblogic 6.1
              >
              > The "/" in getServletContext().getResource("/content/structure/a.txt")
              means the
              > web (WAR) application root, not your EAR root.
              >
              > The ClassCastException is because that content.openStream() is not
              FileInputStream
              > and has nothing to do with Weblogic. You should treat it as normal
              InputStream.
              >
              >
              > "John Hilgedick" <[email protected]> wrote:
              > >Hey all,
              > >
              > >I've got a serious problem that I can't figure out. This should be
              really
              > >simple - but it's alluding me. I have an ear file with a number of
              servlets
              > >inside it. This ear file also contains a resource that my servlets want
              > >to
              > >read from. This resource is located (within the ear file) at:
              > >"/content/structure/a.txt". The file contains raw ascii.
              > >
              > >To have my serlvet read from this file, I thought it would be as simple
              > >as:
              > >
              > >URL content =
              > >servlet.getServletContext().getResource("/content/structure/a.txt");
              > >// pw is an instance of PrintWriter
              > >pw.print(content.getContent());
              > >
              > >However, when I execute the above I get the following exception:
              > >
              > >java.lang.NullPointerException
              > > at
              > >java.net.URLConnection.stripOffParameters(URLConnection.java:1011)
              > > at
              java.net.URLConnection.getContentHandler(URLConnection.java:979)
              > > at java.net.URLConnection.getContent(URLConnection.java:581)
              > >
              > >OK, so fine - I figure that I'm new to this. The documentation for the
              > >URL
              > >class tells me there is another way around this. It says that rather
              > >then
              > >calling getContent() directly, I can open a stream on the URL and read
              > >from
              > >that, like so:
              > >
              > >URL content =
              >
              >servlet.getServletContext().getResource("/content/structure/scenario2resour
              c
              > >es.txt");
              > >FileInputStream fis = content.openStream();
              > >
              > >but when I do this I get the following different exception:
              > >
              > >java.lang.ClassCastException: weblogic.utils.zip.SafeZipFileInputStream^M
              > > at Utility.writeFileToOutput(Utility.java:134)^M
              > >
              > >Apparently this thing is trying to return a web-logic-specific stream
              > >(which
              > >is incompatible with an FileInputStream) - which I don't want to use
              > >or
              > >learn about since I want my stuff to work under other webservers.
              > >
              > >Can anyone tell me what I'm doing wrong? This should be simple.
              > >
              > >-john
              > >
              > >
              > >--
              > >John Hilgedick
              > >WisdomTools, Inc.
              > >[email protected]
              > >
              > >
              >
              

  • Need to Commit Execute Immediate???

    Hi,
    I'm just wondering if I need to commit execute immediate (oracle 10g and 9i)?
    I have an insert statement that I run exeute immediate in, does it commit automatically?
    Thanks for your help.

    the problem is, that in read committed isolation level (which is the default for Oracle) a query has to see data in the state that it was in, when the query startet (committed by other sessions plus eventually local changes by the own session up to the start system change number of the query, so DML is possible but no commits).
    If you try to fetch accross commits, that is: your query is still running but meanwhile you would change and commit data i.e by calling a function inside a query, you would be changing the system commit number. The query would have to keep track of which new SCNs where caused by the query and which SCNs possibly in between were not, further then the Delta would have to be calculated to see only the own changes (committed or not). That is not implemented in standard SQL databases.
    Nevertheless there are workarounds:
    either you are starting a transaction that is treated as if another session would do that (pragma autonomous transaction) or you access records using rowids you selected beforehand.

Maybe you are looking for

  • Is anyone satisfied with Verison customer support and service?

    Verizon has the worst customer support organization I've ever dealt with in over 30 years of commercial activity in the US and abroad. I tried accessing support via live chat or telephone twice.  Neither works.  I am not really looking for answers, j

  • Vendor Return after clearing the material fron Quality (UD)

    All SAP Gurus, We have created the PO. Made the GR, material went for Quality inspection. Material was suppose to be proper and so cleared from Quality inspection (QA32, that is UD has been made). Now, we came to know that material is not as per the

  • Safari Unexpectedly Quits at popular sites

    Started happening after 3.1.1 upgrade. At first it only happened when logging in to Comcast.net to check web email. Now it crashes when loading ESPN.com. There have been other also. Tried: Delete all cookies, Reset Safari, Reinstall. Next Step, Pendi

  • Battery getting bettter?

    I have a second hand Powerbook G4 (a 5.8 model) that had a battery with a battery health showing a 62% with either Coconut Battery and iStat Pro. The battery does not fall within the Apple battery exchange program. OSX was/is updated as updates are/w

  • Using ALV function with tables

    Hello Everyone, Can anyone pls explain with an example how to use ALV in unicode to write out a table.  Since following statements is porducing error: write:/T510N, 'T510N was changed'. it gives uncompatible error.  In non unicode system it works fin