af:query component - need help

hi
I am implemeting a search page wiht <af:query> component with view criteria. (to be specific drag and drop viewCriteria as query panel with table)
what i observe is that when I do "Add fields" at runtime the compnent moves up and up till it hides the panelHeader and the other fields with no access to it.
After i refresh the screen the component comes back to its normal positon but pushes the table component below it down till its barely visible.
This component seems to be very unstable.
Let me know if there is any workaround without making the screen unstable.

Hi,
You can find some related info here..
Can I achive valueChangeListener in af:query?
and
http://jobinesh.blogspot.com/2011/03/retrieving-viewcriteria-from-custom.html
Thanks,
TK

Similar Messages

  • Query problem - need help

    Hi everyone,
    I need some help from you because before I update my View Object I need to know one value using a Query like this: SELECT cp FROM cpostais WHERE cp4=1234 AND cp3 = 123. The result of the Query I need to save it on a variable (let's call CP) so I can use it to update my View Object. Something like this: currentRow.setAttribute("CPostal", CP);
    I'm using JDeveloper 10.1.2, struts and UIX pages.
    Can anyone tell me how can I do this? I need an example or a tutorial.
    This is really importante, can anyone help me??
    Thanks,
    Atena
    Message was edited by:
    Atena

    I tried to use something like this:
    ViewObject thirdView = daContext.getBindingContext().getDefaultDataControl().getApplicationModule().findViewObject("S2CodigosPostaisView1");
    thirdView.setWhereClauseParam(0, currentRow1.getAttribute("Localidade"));
    thirdView.setWhereClauseParam(1, currentRow1.getAttribute("Cp"));
    thirdView.setWhereClauseParam(2, currentRow1.getAttribute("Ext"));
    thirdView.executeQuery();
    Row currentRow3 = thirdView.getCurrentRow();
    currentRow3.getAttribute("Id");
    But this is not working. :(
    Can anyone help me with this????
    Thanks,
    Atena
    Message was edited by:
    Atena

  • In af:query component , need to make Match option invisble

    Hi,
    i am using af:query component and do not want to show the Match with radio button options (All, Any).
    Can anyone suggest how to achieve this.

    You use view criteria, as this is what af:query is for. You use 'All queryable Attributes' which is an implicit view criteria.
    There is no easy way (I don't know one) to remove the 'Match all/any' radio button other than the way Luc described. In your case you have to build a view criteria like the 'All queryable Attributes' to get to the switch in the UI hint tab of the view criteria.
    To do this you create a new criteria and add all attributes you want to one group without specifying and literal or bind variable and use an operator like StartWith for strings and equal for numbers. Then uncheck the 'Show Match all Any' checkbox and use this view criteria for your af:query.
    Timo

  • Carousel component, need help!?

    Hi! I created master/detail form in JDeveloper! Where Carousel is detail form.
    I added bean to Carousel component:
    public class Carousel {
        public Carousel() {
         * Gets new carusel item and set current row of iterator.
         * @param event
        public void caruselSpin(CarouselSpinEvent event) {
                List l =(List)event.getNewItemKey();
                Key k = (Key)l.get(0);
                DCIteratorBinding iter =
                    getDCBindingContainer().findIteratorBinding("AAtteli1Iterator");
                iter.setCurrentRowWithKey(k.toStringFormat(true));
        public  DCBindingContainer getDCBindingContainer() {
            return (DCBindingContainer)resolveExpression("#{bindings}");
        public  Object resolveExpression(String expression) {
            FacesContext facesContext = FacesContext.getCurrentInstance();
            Application app = facesContext.getApplication();
            ExpressionFactory elFactory = app.getExpressionFactory();
            ELContext elContext = facesContext.getELContext();
            ValueExpression valueExp =
                elFactory.createValueExpression(elContext, expression,
                                                Object.class);
            return valueExp.getValue(elContext);
    }So when I run my page I can see something like this: http://my.jetscreenshot.com/2677/20101005-yas0-26kb
    When I navigate witth Carousel to last (3 image) then I can see something like this: http://my.jetscreenshot.com/2677/20101005-kwtm-22kb
    WHY when I am on first image, I can't see last image in foggy way? And what to do?
    To View Images I use: /ImageServletCarousel?Id=#{bindings.ADokumentiPk.inputValue} and imegeServlet.
    Hope my question and information is clear and someone can help me. If not clear or need mor information then please let me know.
    Best regards, Debuger!

    Maybe the problem is in servlet?
    package kokaugi.view.servlets;
    import java.io.IOException;
    import java.io.PrintWriter;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.OutputStream;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServlet;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.Row;
    import oracle.jbo.ViewObject;
    import oracle.jbo.client.Configuration;
    import oracle.jbo.domain.BlobDomain;
    public class ImageServlet extends HttpServlet {
        public void doGet(HttpServletRequest req, HttpServletResponse res)
                                                 throws ServletException, IOException {
             processResponse(req,res);
         public void doPost(HttpServletRequest req, HttpServletResponse res)
                                                 throws ServletException, IOException {
             processResponse(req,res);
         private void processResponse(HttpServletRequest req, HttpServletResponse res)
                                                 throws ServletException, IOException{
             String imageId = req.getParameter("Id");
             OutputStream out = res.getOutputStream();
             String amDef = "kokaugi.model.KokaugiModule";
             String config = "KokaugiModuleLocal";
             ApplicationModule am =  Configuration.createRootApplicationModule(amDef, config);
             ViewObject vo = am.findViewObject("ADokumentiDati1");
             if(imageId != null){
               vo.setWhereClause("A_DOKUMENTI_PK=:img_id_tab");
                          vo.defineNamedWhereClauseParam("img_id_tab", null, null);
                          vo.setNamedWhereClauseParam("img_id_tab", imageId);
                          String query = vo.getQuery();
                          System.out.println(query);
                          vo.executeQuery();
             if(vo.getEstimatedRowCount()==1){
                Row currentRow = vo.first();
                String contentType = (String)currentRow.getAttribute("DokumentaTips");
                if(contentType.equals("image/jpeg") || contentType.equals("image/gif")|| contentType.equals("image/png")){
                        BlobDomain image = (BlobDomain)currentRow.getAttribute("Dokuments");
                        res.setContentType(contentType);
                                InputStream is = image.getInputStream();
                                byte[] buffer = new byte[10 * 1024];
                                int nread;
                                while ((nread = is.read(buffer)) != -1)
                                out.write(buffer, 0, nread);
                                out.flush();
                                out.close();
            Configuration.releaseRootApplicationModule(am, false);
    }

  • Query Designer: Need help.

    Hi All,
    This is regarding query issue.
    Is this the right forum for this issue or is there a forum for that?
    Kindly tell me where should i post this kind of issue.
    BTW, below is my issue. I'm finding it hard resolving the defect.
    Needs advice on this issue.
    The user wants a record for a certain organization.
    He/she input all the required parameters.
    Let's say:
    Business leader ID: XXX01
    Begin date: 2010, 2011
    End date: 2010, 2011
    Status: Active
    After executing the report, it returns all of the necessary data records.
    But when he click on variable screen or change selection, then changes "ONLY" the Business leader ID.
    It goes:
    Business leader ID: XXY02
    Begin date: 2010, 2011
    End date: 2010, 2011
    Status: Active
    No Applicable Data were returned.
    User closes the report the reopen.
    He initially entered again with the second ID, parameters now are initially:
    Business leader ID: XXY02
    Begin date: 2010, 2011
    End date: 2010, 2011
    Status: Active
    Then necessary records were returned.
    Question: why is it not returning any data records when he/she change the Business leader ID?
    That problem arises only when Business Leader ID was being changed.
    But when he/she change selection and change the filter on Begin Date, End Date, Status, the report still provide the data.
    The report is not refreshing only when Business Leader ID was being changed.
    Thanks!

    Hi,
    You have to check it in your Bex Designer what kind of filter have given report.  I think the variable which are user entering the value in the initial screen which may for hard filter. 
    Open your query in designer and give the details of Variable screen would be very much easy to identify the issue. 
    Just try this
    V1 is the variable for  Business leader ID: XXX01  
    V2 is the variable for  Begin date: 2010, 2011
    V3 is the variable for  End date: 2010, 2011
    V4 is the variable for  Status: Active
    Except V1 variable all can be included in hard filter and Include V1 as restriction. 
    Hope this will help you to close the issue .. if you need any further assistance , please give the screen shot of your report in bex designer.
    Thanks
    BVR

  • Select Query Problem-need help

    hi,
    Help me out from this problem.
    Actually i have a table and the data in it as follows:
    Department Name Job Name
    Accounts Sr. Accountant
    Accounts Jr. Accountant
    Accounts Cleark
    But i dont want the repeated Department Name.. and i want the same output as follows.
    Department Name Job Name
    Accounts Sr. Accountant
    Jr. Accountant
    Cleark
    Without using sql reports and Sql Plus additional commands.
    The same output should come from a sql query only.
    Thanks in Advance
    Md Anwer Ali

    I shouldn't try to code before I have had at least three cups of coffee. The actual answer is:
    select decode(department,lag(department) over (order by department),null,department)
    , job
    from departments
    order by department.
    I ran this:
    select decode(job,lag(job) over (order by job),null,job)
    , ename
    from emp
    order by job
    and got this result:
    SQL> /
    DECODE(JO ENAME
    ANALYST SCOTT
    FORD
    CLERK SMITH
    ADAMS
    MILLER
    JAMES
    MANAGER JONES
    CLARK
    BLAKE
    PRESIDENT KING
    SALESMAN ALLEN
    MARTIN
    TURNER
    WARD
    14 rows selected.

  • Simple sum query I need help with please

    I need a query to do something like this:
    select customer_site_use_id
    from ar_payment_schedules_all ps
    where ps.status = 'OP'
    AND NVL(ps.receipt_confirmed_flag,'Y') = 'Y'
    and exists (select (sum(ps1.acctd_amount_due_remaining) as amtdue)
    from ar_payment_schedules_all ps1
    where ps1.customer_site_use_id = ps.customer_site_use_id
    and amtdue < 0)
    and ps.customer_site_use_id = 1593
    I may be making this too difficult. I don't know if I need the exists clause and the second select statement. In the exists statement, if the sum of all of the acctd_amount_due_remaining in ar_payment_schedules_all for the same customer_site_use_id is less than 0, then it is in the results.

    Hi,
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    Always say which version of Oracle you're using.
    I'm pretty sure you don't want an EXISTS sub-query. EXISTS returns TRUE if the sub-query finds any rows; it doesn't matter how many, or what's on them.
    Perhaps you want something like this:
    WITH     got_total_amount_due     AS
         SELECT       customer_site_use_id
         ,       SUM (acctd_amount_due)     AS total_amount_due
         FROM       ar_payment_schedules_all
         GROUP BY  customer_site_use_id
    SELECT    ps.customer_site_use_id
    FROM        ar_payment_schedules_all     ps
    JOIN       got_total_amount_due          td  ON  ps.customer_site_use_id  = td.customer_site_use_id
    WHERE       ps.status            = 'OP'
    AND       NVL ( ps.receipt_confirmed_flag
               , 'Y'
               )                 = 'Y'
    AND        ps.customer_site_use_id = 1593
    AND       td.total_amount_due       < 0
    ;That gives you access to the total amount for each customer_site_id

  • Problem with a query i need help ;(

    hi all guys!!! i have this query:
    SELECT SII_PLAACCIO.TITOL AS "PLA_TITLE" ,JBPM_PROCESSINSTANCE.ID_ AS "PROC_INST",SII_ACCIO_ORG_RESP.NOM AS "RESP_TITLE" ,SII_EIX.NOM AS "EIX_TITLE" ,
    REPTE.DESCRIPCIO AS "REPT_TITLE",SII_PROGRAMA.TITOL AS "PRG_TITLE" ,SII_ACCIO.TITOL AS "ACC_TITLE",PROJECTE.DESCRIPCIO AS "PROY_TITLE",ESTAT.DESCRIPCIO AS "ACC_STATUS", DEPARTAMENT.DESCRIPCIO AS "DEPARTAMENT",
    ROUND(SII_PRESSUPOST.TOTAL_EXECUTAT,'2') AS FON_SPENDED, ROUND(SII_PRESSUPOST.TOTAL_ASSIGNAT,'2') AS FON_BUDGET
    FROM SII_ACCIO
    ACTUACIO
    LEFT JOIN JBPM_PROCESSINSTANCE ON SII_ACCIO.PROCESS_INSTANCE_ID = JBPM_PROCESSINSTANCE.ID_
    LEFT JOIN JBPM_TOKEN ON JBPM_PROCESSINSTANCE.ROOTTOKEN_ = JBPM_TOKEN.ID_
    LEFT JOIN JBPM_NODE ON JBPM_TOKEN.NODE_ = JBPM_NODE.ID_
    INNER JOIN SII_MESTRE ESTAT ON (JBPM_NODE.NAME_ = ESTAT.VALOR AND ESTAT.TIPUS = 'EWF')
    LEFT JOIN SII_PRESSUPOST ON SII_ACCIO.PRESSUPOST = SII_PRESSUPOST.ID
    LEFT JOIN sii_accio_ORG_RESP ON SII_ACCIO.ID = SII_ACCIO_ORG_RESP.ACCIO_ID
    LEFT JOIN SII_MESTRE DEPARTAMENT ON (SII_ACCIO_ORG_RESP.DEPARTAMENT_ID = DEPARTAMENT.ID AND DEPARTAMENT.TIPUS = 'DEP')
    PROJECTE
    LEFT JOIN SII_MESTRE PROJECTE ON (SII_ACCIO.PROJECTE_ID = PROJECTE.ID AND PROJECTE.TIPUS = 'PRJ')
    PROGRAMA
    LEFT JOIN SII_PROGRAMA ON SII_ACCIO.PROGRAMA_ANUAL = SII_PROGRAMA.ID
    REPTE
    LEFT JOIN SII_MESTRE REPTE ON (SII_PROGRAMA.REPTE_ID = REPTE.ID AND REPTE.TIPUS = 'REP')
    EIX
    LEFT JOIN SII_EIX ON SII_PROGRAMA.EIX_ANUAL = SII_EIX.ID
    PLA ACTUACIO
    LEFT JOIN SII_PLAACCIO ON SII_EIX.PLA_ACCIO = SII_PLAACCIO.ID
    the problem is the following: the column "JBPM_PROCESSINSTANCE.ID_" can contain duplicate entries, but in the result i just want one of the rows... it doesn't matter which one, i just want only one...
    i can't use distinct and group by,.., i've been trying for the last 2 days almost but i cannot find a solution..

    But if don't want to use group by:
    select * from (
    SELECT SII_PLAACCIO.TITOL AS "PLA_TITLE" ,min(JBPM_PROCESSINSTANCE.ID_) AS "PROC_INST",SII_ACCIO_ORG_RESP.NOM AS "RESP_TITLE" ,SII_EIX.NOM AS "EIX_TITLE" ,
      REPTE.DESCRIPCIO AS "REPT_TITLE",SII_PROGRAMA.TITOL AS "PRG_TITLE" ,SII_ACCIO.TITOL AS "ACC_TITLE",PROJECTE.DESCRIPCIO AS "PROY_TITLE",ESTAT.DESCRIPCIO AS "ACC_STATUS", DEPARTAMENT.DESCRIPCIO AS "DEPARTAMENT",
    ROUND(SII_PRESSUPOST.TOTAL_EXECUTAT,'2') AS FON_SPENDED, ROUND(SII_PRESSUPOST.TOTAL_ASSIGNAT,'2') AS FON_BUDGET,
    row_number() over (partition by SII_PLAACCIO.TITOL ,SII_ACCIO_ORG_RESP.NOM ,SII_EIX.NOM ,
      REPTE.DESCRIPCIO,SII_PROGRAMA.TITOL ,SII_ACCIO.TITOL,PROJECTE.DESCRIPCIO,ESTAT.DESCRIPCIO, DEPARTAMENT.DESCRIPCIO,
    ROUND(SII_PRESSUPOST.TOTAL_EXECUTAT,'2'), ROUND(SII_PRESSUPOST.TOTAL_ASSIGNAT,'2') order by rownum) rn
       FROM SII_ACCIO
         --ACTUACIO--
         LEFT JOIN JBPM_PROCESSINSTANCE ON SII_ACCIO.PROCESS_INSTANCE_ID =  JBPM_PROCESSINSTANCE.ID_
         LEFT JOIN JBPM_TOKEN ON JBPM_PROCESSINSTANCE.ROOTTOKEN_ = JBPM_TOKEN.ID_
         LEFT JOIN JBPM_NODE ON JBPM_TOKEN.NODE_ = JBPM_NODE.ID_
         INNER JOIN SII_MESTRE ESTAT ON (JBPM_NODE.NAME_ = ESTAT.VALOR AND ESTAT.TIPUS = 'EWF')
         LEFT JOIN SII_PRESSUPOST ON SII_ACCIO.PRESSUPOST = SII_PRESSUPOST.ID
         LEFT JOIN sii_accio_ORG_RESP ON SII_ACCIO.ID = SII_ACCIO_ORG_RESP.ACCIO_ID
         LEFT JOIN SII_MESTRE DEPARTAMENT ON (SII_ACCIO_ORG_RESP.DEPARTAMENT_ID = DEPARTAMENT.ID AND DEPARTAMENT.TIPUS = 'DEP')
         --PROJECTE--
         LEFT JOIN SII_MESTRE PROJECTE ON (SII_ACCIO.PROJECTE_ID = PROJECTE.ID AND PROJECTE.TIPUS = 'PRJ')
         --PROGRAMA--
         LEFT JOIN SII_PROGRAMA ON SII_ACCIO.PROGRAMA_ANUAL = SII_PROGRAMA.ID
         --REPTE--
         LEFT JOIN SII_MESTRE REPTE ON (SII_PROGRAMA.REPTE_ID = REPTE.ID AND REPTE.TIPUS = 'REP')
         --EIX--
         LEFT JOIN SII_EIX ON SII_PROGRAMA.EIX_ANUAL = SII_EIX.ID
         --PLA ACTUACIO--
         LEFT JOIN SII_PLAACCIO ON SII_EIX.PLA_ACCIO = SII_PLAACCIO.ID
    ) where rn=1Max
    http://oracleitalia.wordpress.com

  • Simple SQL query..need help

    Hi All,
    I have a requirement not to show the row, if all columns value is zero. Could someone help me how to do it?
    For example:
    A     B     C   D    E
    1 1 5 1 2
    1 0 5 0 2
    0 9 7 1 0
    0 0 0 0 0
    From the above example the only last row should not be shown, because all columns value is zero.
    Thanks in advance.

    Another way:
    with abc as (select 1 a, 1 b, 5 c, 1 d, 2 e from dual union all
                 select 1 a, 0 b, 5 c, 0 d, 2 e from dual union all
                 select 0 a, 9 b, 7 c, 1 d, 0 e from dual union all
                 select 0 a, 0 b, 0 c, 0 d, 0 e from dual union all
                 select null a, 0 b, 0 c, 0 d, 0 e from dual)
    select a, b, c, d, e
    from   abc
    where  (nvl(a, 0), nvl(b, 0), nvl(c, 0), nvl(d, 0), nvl(e, 0)) not in (select 0,0,0,0,0 from dual);
             A          B          C          D          E
             1          1          5          1          2
             1          0          5          0          2
             0          9          7          1          0

  • Query pain - need help

    Hi @ll,
    i got this query, but it does not work. Any idea ?
    DECLARE @xyz nvarchar(1)
    SELECT @xyz =  (SELECT T0.TreeType FROM OITM T0 WHERE T0.ItemCode = [%1])
    SELECT CASE @xyz <> 'S' THEN '1' ELSE '2' END
    Thanks Steffen

    You have left a 'When'. Try this:
    DECLARE @xyz nvarchar(1)
    SELECT @xyz =  (SELECT T0.TreeType FROM OITM T0 WHERE T0.ItemCode = [%1])
    SELECT CASE @xyz When  'S' THEN '1' ELSE '2' END

  • MDX query..need help

    Hi experts..
    I have written a MDX query as follows:
    alter session set dml_output alias off ;
    spool stdout on to 'C:\ACCT_110711.TXT';
    SELECT {} ON AXIS(0), {[Year].Members} ON AXIS(1) FROM [CUBE];
    spool off;
    This is generating a txt file with the whole output - including the query I put and the "Statement executed successfully" message.
    What do I have to do to get just the output in a file. Is it possible in Essbas..or do I have to manipulate the file using unix or something after the generation.

    The output from spooling to a file using Maxl is not the best, MDX is not really the equivalent of report scripts.
    You could look at parsing the file after it is generated, or maybe look at perl or an API or ODI or report scripts to generate it in a cleaner format.
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • Sql query tunning, need help!

    below is the sql that runs very very slow:
    SELECT h.STAT_HIST_ID, h.WF_ACTN, h.USR_ACTN,
          h.WF_CHNG_DATA, h.USR_CHNG_DATA, h.PRCSG_TM, h.UPD_LOGIN, h.UPD_DT,
          RTRIM(c.LAST_NM || ', ' || c.FIRST_NM || ' ' || c.MIDDLE_INITIAL)
          FROM WF_STAT_HIST h, CSE_USER_DATA_VW c WHERE h.WRK_ITM_ID = 'GT1MPTG01ATBZP'
          AND h.UPD_LOGIN = c.USER_NM (+) ORDER BY h.UPD_DT ;Here is its index:
    all_indexes:
    SCGDBA     WF_STAT_HIST_INDX_ARCH     NORMAL     SCGDBA     WF_STAT_HIST     TABLE     NONUNIQUE     DISABLED          IMS_I
    SCGDBA     PK_WF_STAT_HIST     NORMAL     SCGDBA     WF_STAT_HIST     TABLE     UNIQUE     DISABLED          SCG_I
    SCGDBA     WF_STAT_HIST_IDX1     NORMAL     SCGDBA     WF_STAT_HIST     TABLE     NONUNIQUE     DISABLED          SCG_I
    all_ind_columns:
    SCGDBA     WF_STAT_HIST_INDX_ARCH     SCGDBA     WF_STAT_HIST     ARCHIVEDT     1     7     0     ASC
    SCGDBA     PK_WF_STAT_HIST     SCGDBA     WF_STAT_HIST     STAT_HIST_ID     1     22     0     ASC
    SCGDBA     WF_STAT_HIST_IDX1     SCGDBA     WF_STAT_HIST     WF_ACTN     1     50     50     ASC
    SCGDBA     WF_STAT_HIST_IDX1     SCGDBA     WF_STAT_HIST     USR_ACTN     2     50     50     ASCHere is its explain plan:
    Plan hash value: 479056202
    | Id  | Operation           | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT    |                  |   216 | 30456 | 70864   (2)| 00:14:11 |
    |   1 |  SORT ORDER BY      |                  |   216 | 30456 | 70864   (2)| 00:14:11 |
    |*  2 |   HASH JOIN OUTER   |                  |   216 | 30456 | 70863   (2)| 00:14:11 |
    |*  3 |    TABLE ACCESS FULL| WF_STAT_HIST     |   216 | 24840 | 70857   (2)| 00:14:11 |
    |   4 |    TABLE ACCESS FULL| CSE_USER_DATA_VW |  1013 | 26338 |     6   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       2 - access("H"."UPD_LOGIN"="C"."USER_NM"(+))
       3 - filter("H"."WRK_ITM_ID"='GT1MPTG01ATBZP')Could you guys take a look and tell me what the problem might be?
    I can`t give you TKPROF, because I got no access to that trace files!
    Any thoughts would be appreciated:-)
    Edited by: PhoenixBai on Sep 27, 2009 3:13 PM

    Pl post the output of the following
    select count(*) from wf_stat_hist;
    select count (distinct wrk_itm_id) from wf_stat_hist;
    select count (distinct upd_login) from wf_stat_hist;Your code is performing poorly because your WHERE clause is searching on a column on WF_STAT_HIST that is not indexed. Hopefully the output of the above code will determine which column (WRK_ITM_ID or UPD_LOGIN) is a better candidate to be indexed on. If neither of these columns is a good candidate, you may have to change the WHERE clause to be more selective rather than do a full table scan as the plan indicates.
    HTH
    Srini

  • Need help with INSERT and WITH clause

    I wrote sql statement which correctly work, but how i use this statment with INSERT query? NEED HELP. when i wrote insert i see error "ORA 32034: unsupported use of with clause"
    with t1 as(
    select a.budat,a.monat as period,b.vtweg,
    c.gjahr,c.buzei,c.shkzg,c.hkont, c.prctr,
    c.wrbtr,
    c.matnr,
    c.menge,
    a.monat,
    c.zuonr
    from ldw_v1.BKPF a,ldw_v1.vbrk b, ldw_v1.bseg c
    where a.AWTYP='VBRK' and a.BLART='RV' and a.BUKRS='8431' and a.awkey=b.vbeln
    and a.bukrs=c.bukrs and a.belnr=c.belnr and a.gjahr=c.gjahr and c.koart='D'
    and c.ktosl is null and c.gsber='4466' and a.gjahr>='2011' and b.vtweg='01'
    ,t2 as(
    select a.BUKRS,a.BELNR, a.GJAHR,t1.vtweg,t1.budat,t1.monat from t1, ldw_v1.bkpf a
    where t1.zuonr=a.xblnr and a.blart='WL' and bukrs='8431'
    ,tcogs as (
    select t2.budat,t2.monat,t2.vtweg, bseg.gjahr,bseg.hkont,bseg.prctr,
    sum(bseg.wrbtr) as COGS,bseg.matnr,bseg.kunnr,sum(bseg.menge) as QUANTITY
    from t2, ldw_v1.bseg
    where t2.bukrs=bseg.bukrs and t2.belnr=bseg.BELNR and t2.gjahr=bseg.gjahr and BSEG.KOART='S'
    group by t2.budat,t2.monat,t2.vtweg, bseg.gjahr,bseg.hkont,bseg.prctr,
    bseg.matnr,bseg.kunnr
    ,t3 as
    select a.budat,a.monat,b.vtweg,
    c.gjahr,c.buzei,c.shkzg,c.hkont, c.prctr,
    case when c.shkzg='S' then c.wrbtr*(-1)
    else c.wrbtr end as NTS,
    c.matnr,c.kunnr,
    c.menge*(-1) as Quantity
    from ldw_v1.BKPF a,ldw_v1.vbrk b, ldw_v1.bseg c
    where a.AWTYP='VBRK' and a.BLART='RV' and a.BUKRS='8431' and a.awkey=b.vbeln
    and a.bukrs=c.bukrs and a.belnr=c.belnr and a.gjahr=c.gjahr and c.koart='S'
    and c.ktosl is null and c.gsber='4466' and a.gjahr>='2011' and b.vtweg='01'
    ,trevenue as (
    select t3.budat,t3.monat,t3.vtweg, t3.gjahr,t3.hkont,t3.prctr,
    sum(t3.NTS) as NTS,t3.matnr,t3.kunnr,sum(t3.QUANTITY) as QUANTITY
    from t3
    group by t3.budat,t3.monat,t3.vtweg, t3.gjahr,t3.hkont,t3.prctr,t3.matnr,t3.kunnr
    select NVL(tr.budat,tc.budat) as budat,
    NVL(tr.monat,tc.monat) as monat,
    NVL(tr.vtweg,tc.vtweg) as vtweg,
    NVL(tr.gjahr, tc.gjahr) as gjahr,
    tr.hkont as NTS_hkont,
    tc.hkont as COGS_hkont,
    NVL(tr.prctr,tc.prctr) as prctr,
    NVL(tr.MATNR, tc.MATNR) as matnr,
    NVL(tr.kunnr, tc.kunnr) as kunnr,
    NVL(tr.Quantity, tc.Quantity) as Quantity,
    tr.NTS as NTS,
    tc.COGS as COGS
    from trevenue TR full outer join tcogs TC
    on TR.BUDAT=TC.BUDAT and TR.MONAT=TC.MONAT and TR.GJAHR=TC.GJAHR
    and TR.MATNR=TC.MATNR and TR.KUNNR=TC.KUNNR and TR.QUANTITY=TC.QUANTITY
    and TR.VTWEG=TC.VTWEG and TR.PRCTR=TC.PRCTR
    Edited by: user13566113 on 25.03.2011 5:26

    Without seeing what you tried it is hard to say what you did wrong, but this is how it would work
    SQL> create table t ( n number );
    Table created.
    SQL> insert into t
      2  with test_data as
      3    (select 1 x from dual union all
      4     select 2 x from dual union all
      5     select 3 x from dual union all
      6     select 4 x from dual)
      7  select x from test_data;
    4 rows created.
    SQL>

  • Need Information on af:query component

    Hi,
    I need some information on the <af:query> component in JDev 11g.
    When using ADF 11g's new component, ADF Query (af:query) whether the default "All Queryable Attributes" or on other newly defined View Criterias:
    1     What are the disadvantages of this component, given that the result-set - without filtering - is large (between 1350 and 1700 rows, approximately).
    2     Does it fetch all rows from the database, then performs filtering upon user's entered search criteria – i.e., hitting the "search" button?
    3     Is there a way to add client-side validation on the search criteria attributes?
    4     In general: What is the best practice to implement a Search Form in ADF 11g
    Kindly provide your inputs for the same.
    Thanks,
    Vineet

    user445872 wrote:
    Hi,
    I need some information on the <af:query> component in JDev 11g.
    When using ADF 11g's new component, ADF Query (af:query) whether the default "All Queryable Attributes" or on other newly defined View Criterias:
    1     What are the disadvantages of this component, given that the result-set - without filtering - is large (between 1350 and 1700 rows, approximately).
    2     Does it fetch all rows from the database, then performs filtering upon user's entered search criteria – i.e., hitting the "search" button? You could tune your VO not to exeute the query by default (i.e., before applying a search criteria)
    check this blog for sample: http://andrejusb-samples.blogspot.com/2009/08/jdevadf-sample-oracle-adf-tuning.html
    As an other option, you could have a default view criteria applied and executed to filter to result set if it is applicable for your usecase.
    3     Is there a way to add client-side validation on the search criteria attributes?I'm not sure about this though.
    4     In general: What is the best practice to implement a Search Form in ADF 11g
    In addition check this sample as well. It might be of help: http://andrejusb-samples.blogspot.com/2009/09/jdevadf-sample-programmatical-reset-for.html
    regards,
    ~K

  • Need Help w/Form Component

    running SJSC2U1 on XP
    Need help with using the form and associated components to create a search functionality in a jspf page..
    I have used the form component and attempted to use the properties method="get" action="http://www.aaa.com/query.html" name="getit" etc...
    I am told (error msg) that these methods, etc. are not valid for the "form" component
    Does anyone now how to create a search functionality in a jspf page using components, be it "markup" layoutPanel, Form or whatever..
    a simple example (code) would be great.
    Thanks

    running SJSC2U1 on XP
    Need help with using the form and associated components to create a search functionality in a jspf page..
    I have used the form component and attempted to use the properties method="get" action="http://www.aaa.com/query.html" name="getit" etc...
    I am told (error msg) that these methods, etc. are not valid for the "form" component
    Does anyone now how to create a search functionality in a jspf page using components, be it "markup" layoutPanel, Form or whatever..
    a simple example (code) would be great.
    Thanks

Maybe you are looking for

  • How can I override pop-up windows for a specific site?

    In Firefox for Mac and Internet Explorer on a PC, you can turn off pop windows, but authorize specific sites to open a pop-up window.  Is there a work around in Safari?  The simple on/off switch (command-shift-k) is not adequate.  I'd like to use jus

  • Looking for HP Mini Headset

    Hi, I hope  I can get an answer re accessories for AUSTRALIA. I have a  mini series 210-1131TU  and want a headset that  has the  3 pin audio plug(3.5mm). Trying to chat  on line  allowed me  to talk  to an Indian gent, after wasting my time  told me

  • Secured webpage requires Internet Explorer

    I'm a Apple newbie as of today. Trying to access a secure webpage for work and it requires Microsoft Internet Explorer 5.0 for MAC or better, do I have to download it or does Safari handle that requirement? Also requires Adobe Acrobat Reader, again,

  • Pages and links missing on HostMonster

    I created my website with iWeb and published it to a folder on my desktop. All links, pages and albums work beautifully. When I uploaded my site to HostMonster, all I get is my Welcome page with no index to my other pages. I had created links to othe

  • Changing the EVB3 speed control

    How do I change the rotary speed control number on the EVB3 to accept controller change #82, which is what my Nord Electro is sending? I'm using the Electro as a MIDI controller for Mainstage, and I've got all three pedal jacks plugged in, but i don'