Want single row but get multiple rows

Hi,
A report exists of payment details. It was requested to change it such that there is only one row per checkrun name.
I did a group sort on all non amount fields and changed the amount field to sum instead of detail.
What I am getting is for each checkrun name, a row with all the information that I want, but in addition, and extra row with the same sum amount repeating itself. Checking delete duplicate rows doesn't help. Doing a group sort on the amount doesn't help; it just gives blank rows after the necessary row.
This is urgent. Can anyone help?
THanks.
Leah

Here is the sql inspector after I had removed the group sort.
SELECT DISTINCT APPS.JAFI_DISCO_UTILS_PKG.GET_BANK_ACCOUNT_NAME_BY_ID(i462841) as C_1,SUBSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'=',( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'+',1) )) )+1,( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'!',( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'=',( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'+',1) )) )) )-( ( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'=',( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'+',1) )) )+1 )) as C_10,SUBSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'!',( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'=',( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'+',1) )) )) )+1) as C_2,INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'!',( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'=',( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'+',1) )) )) as C_9,SUBSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'+',1) )+1,( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'=',( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'+',1) )) )-( ( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'+',1) )+1 )) as C_3,INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'=',( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'+',1) )) as C_8,INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'+',1) as C_7,APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) as C_6,APPS.JAFI_DISCO_UTILS_PKG.GET_AWT_AMOUNT(i463119,i463130) as C_4,i462479 as E462479,i462485 as E462485,i462599 as E462599,i462686 as E462686,i462687 as E462687,i462688 as E462688,i462689 as E462689,i462693 as E462693,i462697 as E462697,i463248 as E463248,i463274 as E463274,i463495 as E463495,i463500 as E463500,o462239.i463990 as E463990,o462239.i463993 as E463993,o462239.i622984 as E622984,o462239.i622987 as E622987,as462349_463495_OLD as as462349_463495_OLD,SUM(i462485) OVER(PARTITION BY i462686 ) as C_5
FROM ( SELECT INVOICE_ID AS i463119, INVOICE_PAYMENT_ID AS i463130, EXTERNAL_BANK_ACCOUNT_ID AS i462840, CHECK_CURRENCY_CODE AS i462688, AMOUNT AS i462485, CHECK_DATE AS i462689, APPS.JAFI_DISCO_UTILS_PKG.GET_PAYMENT_GROUP(INVOICE_ID) AS i463990, APPS.JAFI_DISCO_UTILS_PKG.GET_PAYMENT_PRIORITY(INVOICE_ID) AS i463993, BANK_ACCOUNT_NAME AS i462599, CHECK_TYPE AS i462697, CHECK_NUMBER AS i462693, PAYMENT_BASE_AMOUNT AS i463248, CHECK_AMOUNT AS i462687, PAYMENT_NUMBER AS i463274, APPS.JAFI_DISCO_UTILS_PKG.GETCHECKRECEIVER(INVOICE_ID) AS i622984, APPS.JAFI_DISCO_UTILS_PKG.GETCHECKRECEIVERID(INVOICE_ID) AS i622987, CHECK_ID AS i462691 FROM APPS.JAFI_RO_APFG_AP_INVOICE_PAYME) o462239,
( SELECT EXTERNAL_BANK_ACCOUNT_ID AS i462841, CHECKRUN_NAME AS i462686, CHECK_ID AS i462692, VENDOR_ID AS i463582, VENDOR_SITE_ID AS i463601 FROM APPS.JAFI_RO_APFG_AP_PAYMENTS) o462240,
( SELECT SUPPLIER_NUMBER AS i463495, SUPPLIER_TYPE AS i463500, SUPPLIER_ID AS i463490 FROM APPS.JAFI_RO_POFG_SUPPLIERS) o462242,
( SELECT ALTERNATE_SUPPLIER_SITE_NAME AS i462479, IL_WHT_TAX_RPT_GROUP_2 AS i463072, SUPPLIER_SITE_ID AS i463498 FROM APPS.JAFI_RO_POFG_SUPPLIER_SITES) o462244,
( SELECT i263947 AS as462349_463495_OLD_2, MAX(i264114) AS as462349_463495_OLD FROM ( SELECT V_VEND_NUM_ALT AS i264114, V_VENDOR_NUMBER AS i263947 FROM (select
V.VENDOR_ID V_VENDOR_ID
, V.VENDOR_NAME V_VENDOR_NAME
, V.SEGMENT1 V_VENDOR_NUMBER
, to_number(V.SEGMENT1) V_VEND_NUM_ALT
, V.SEGMENT1 || ' - ' || V.VENDOR_NAME
V_VEND_NUM_NAME
, V.VAT_REGISTRATION_NUM V_OSEK_MURSHE
, lpad(nvl(V.VAT_REGISTRATION_NUM,'0'),10,'0') V_OSEK_MURS_ALT
from PO.PO_VENDORS V
Union
Select
-1
,' ALL'
,' ALL'
,-1
,' ALL'
,' ALL'
,' ALL'
from DUAL) CUO263942) o263942 GROUP BY i263947)
WHERE ( (i462692 = i462691(+))
and (i463490 = i463582)
and (i463498 = i463601)
and (i463495 = as462349_463495_OLD_2(+)))
AND (i462688(+) = :"CurrencyCode")
AND (i463072 = :"WithholdingTaxGroup")
AND ( ( i463500 = :"Supplier Type" OR ' ALL' = :"Supplier Type" ) )
AND ( ( i462599 <= :"ToBank" OR :"ToBank" IS NULL ) )
AND ( ( i462689 <= :"ToCheckDate" OR :"ToCheckDate" IS NULL ) )
AND ( ( i462689 >= :"FromCheckDate" OR :"FromCheckDate" IS NULL ) )
AND ( ( i462599 >= :"FromBank" OR :"FromBank" IS NULL ) )
AND ( ( o462239.i463993 = :"PaymentPriority" OR :"PaymentPriority" IS NULL ) )
AND ( ( o462239.i463990 = :"Payment Group" OR :"Payment Group" IS NULL ) )
AND ( ( i462686 = :"CheckrunName" OR :"CheckrunName" IS NULL ) )
AND ( ( i462479 LIKE :"AlternateSupSite" OR :"AlternateSupSite" IS NULL ) )
AND ( ( i463495 = :"sapak_num" OR ' ALL' = :"sapak_num" ) )
ORDER BY i462686 ASC , i462689 ASC , SUBSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'=',( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'+',1) )) )+1,( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'!',( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'=',( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'+',1) )) )) )-( ( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'=',( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'+',1) )) )+1 )) ASC , SUBSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'!',( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'=',( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'+',1) )) )) )+1) ASC , SUBSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'+',1) )+1,( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'=',( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'+',1) )) )-( ( INSTR(( APPS.JAFI_DISCO_UTILS_PKG.GET_BANKBRANCH_FROMBANKACCID(i462840) ),'+',1) )+1 )) ASC , o462239.i463990 ASC , o462239.i463993 ASC , i462599 ASC , i462688 ASC , i462693 ASC , i462479 ASC , as462349_463495_OLD ASC , APPS.JAFI_DISCO_UTILS_PKG.GET_BANK_ACCOUNT_NAME_BY_ID(i462841) ASC , i463500 ASC , i463274 ASC , o462239.i622984 ASC , o462239.i622987 ASC , C_5 ASC , i462697 ASC ;

Similar Messages

  • Smartforms creating a single spool but getting multiple archives

    My print program is calling a Smartform multiple times and is using the CONTROL_PARAMETERS NO_OPEN and NO_CLOSE  to successfully get a single spool entry.  My problem is that I am getting an archive document every time I call the Smartform.  I have also adjusted the TDNEWID from 'X' to space, but with no success.
    Are there certain settings in ARCHIVE_INDEX and/or ARCHIVE_PARAMETERS which ensure that all pages of my Smartform are combined into a single archive document just like they get combined in the spool?  Is there some other way to do this?  Help!

    As it turned out, Pritha's suggestion was a good one.  I finally got it to work.  Here are more details.
    I allow the print program to call the Smartform many times for each page, and using the NO_OPEN and NO_CLOSE as needed so that all pages for each document are combined into the document.  In my case, I get one huge output spool which contains all the documents.
    I save all the data passed to each Smartform call into an internal table.
    Once the printing phase is done, I perform another phase to create the archives as follows.
    Loop thru the internal table and re-adjust the NO_OPEN and NO_CLOSE to indicate which pages I want to be combined into each archive document.  In my case, I want all the pages for each document combined into an archive (one archive per document).  Loop yet again thru the internal table and call the Smartform for each entry in the table.  Be sure the GETOTF flag is set to "X".  This is very important.  The form will not be printed this time, however the OTF data for the form will get returned to the print program in the SSFCRESC1-OTFDATA structure.
    Everytime I encounter a NO_CLOSE value of Space in my loop, I perform OTF_ARCHIVE in program SAPLSTXBC to create an archive document from the OTF data in the structure.
    In this way, I can create archives that contain whatever amount of documents that I want.

  • How to get multiple rows from database table?

    hello !
    I need to get multiple rows from a OLEDB database table and display them on a table object.
    I did "Wrap in subfrom" on the table,  set  subform of the table to "flowed", and checked "Repeat row for each data item" of Row1 of the table.
    But I can get only one row on the table object.
    I need your help.
    Thanks

    Hi,
    best practices when deleting multiple rows is to do this on the business service, not the view layer for performance reasons. When you selected the rows to delete and press submit, then in a managed bean you access thetable instance (put a reference to a managed bean from the table "binding" property") and call getSeletedRowKeys. In JDeveloper 11g, ADF Faces returns the RowKeySet as a Set of List, where each list conatins the server side row key (e.g. oracle.jbo.Key) if you use ADF BC. Then you create a List (ArrayList) with this keys in it and call a method exposed on the business service (through a method activity in ADF) and pass the list as an argument. On the server side you then access the View Object that holds the data and find the row to delte by the keys in the list
    Example 134 here: http://blogs.oracle.com/smuenchadf/examples/#134 provides you with the code
    Frank

  • Get multiple rows from mysql query in NetBeans

    Hi, I am working on a project in NetBeans 6.I have a checkboxlist, and I have a variable in which I save the selected values of the checkboxlist.Now, I want to make a query that will get the rows of the rowset that have the same id as the selected values.for example, I have a checkboxlist that has the following values: Helen, Maria, Anna.The user checks the first two, so I have a variable String[] "checked" that has in it the data 1,2.Now, I have a rowset that has the following query:
    SELECT ALL person.age
    FROM person
    WHERE person.id=? or something like this.I want the parameters to have the values (1,2) so that the rowset has the results of the ages of the two first rows.How do I accomplish that?I am assuming that with one "?" it can't be done because I need multiple parameters. Will something like this work: WHERE person.id IN something,but what will something be?

    christomar wrote:
    I have a rowset that has the following query:
    SELECT ALL person.age
    FROM person
    WHERE person.id=? or something like this.I want the parameters to have the values (1,2) so that the rowset has the results of the ages of the two first rows.How do I accomplish that?Use a PreparedStatement. You probably first need to read the Sun JDBC Tutorial before you do anything.
    I am assuming that with one "?" it can't be done because I need multiple parameters. I've seen people use up to 76 parameters so yes it can be done, it will look like this:
    Will something like this work: WHERE person.id IN something,Yes, you can submit any SQL you want as long as your db supports it (all support ANSI i believe)
    but what will something be?something in that context would be a list/set of data, but you're getting ahead of yourself I think. do the tutorial and look at some code

  • How to get multiple rows at one time in a table?

    hi
    I have a JTable bound with ViewObject and i use multiple selection mode setting to get selection row.
    My question is when i select more then one row at one time i only can get those index from JTable but can't get those rows from ViewObject.is it possible to get rows from ViewObject? or how to use JTable row index to get row from ViewObject?

    repost

  • Display values of a single field in a multiple rows in a table region

    Hi Tech-Gurus,
    I want to display values of a single field ( which is in a table region) in multiple rows and also need to restrict the values from decimal number. If i click save, then it will throw exception "Decimal not allowed".
    xxxxxx
    yyyyyy
    Reg.No
    1234
    5678
    7654
    I need to display the values of REG.NO in different rows like,
    1234
    5678
    7654
    and also need to validate as well against Decimal values.
    Please help me with the code how i will iterate ?

    Hi,
    I am assuming you are talking about displaying substrings from the Reg No in different rows. For this you would need to write a query which identifies the substrings and creates a separate row for each (ensure you choose values for all other columns in the table row). Kindly let me know if the understanding is incorrect.
    To validate against decimal value you can use the java code by checking the difference of the number and the number on which modulus has been applied. Hope that helps.
    Regards
    Sumit

  • JSF datatable to get multiple row values

    I want to get values of SelectBooleanCheckbox and SelectOneMenu in jsf bean from datatable for multiple rows?

    You can find an example here: http://balusc.blogspot.com/2006/06/using-datatables.html

  • How to get multiple Rows in UCCX DB

    Hi All,
    Here is the scenario. One of customer has DB which return the multiple rows of data by querying against one Field.
    suppose there is a Field "National ID Number"  which fetches cutomers' more than one account like post paid customer , prepaid customer, corporate customer etc in different Rows then how could i check this if the customer has more than one Account system should ask about the particular Account Number.
    any help would be grateful for me.
    Thanks

    Is the following way seem correct to store values in an array var
    db read
      successful
        label get_next_record
        db get
          successful
            /* Action to store values in Array variable */
                        Array[c]=accno
    /* “accno” is a variable with Big Dec Type having all possible values fetched by multiple rows */
                        c=c+1 /* where “c” is an index var */
                        goto get_next_record
          no data
            goto no_more_records
    label no_more_records

  • Get Multiple Rows into internal Table using Webdynpro Alv Display ..

    Hi guys ,
    I need to find out the logic for getting all the selected rows into the internal table.
    When i display the ALV Output on webdypro screen .
    USer Selects multiple rows for further processing ..
    Ineed to get all the rows selected by user into an internal table .
    Please let me know how to achive this ...
    Thanks in advance for quick reply
    Regards
    Saurabh Goel

    Hi,
    You need to use the method GET_SELECTED of IF_WD_CONTEXT_NODE to get the rows selected. Also ccheck for the paramters of that method, this retruns the element set.
    This meets your requirement.
    Regards,
    Lekha.

  • SELECT from XML to get multiple rows

    We are trying to set up web services to facilitate access to a central asset database. I’m able to make the request, & I store the response in the following table:
    CREATE TABLE assets
    (asset_name VARCHAR2(40),
    asset_xml XMLType,
    add_dt DATE);
    Different asset types can have the same name so when I get a response there may be several assets returned with the same name but different types as seen in this formatted XML:
    <soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header/>
    <soapenv:Body>
    <AssetDetailsResponse>
    <Asset>
    <ID>44535</ID>
    <AssetName>asset1</AssetName>
    <TypeName>Server</TypeName>
    <Status>Active</Status>
    <SerialNumber>jk823</SerialNumber>
    <Business>Finance</Business>
    <Vendor>hewlett packard</Vendor>
    <Location>
    <CountryName>United States</CountryName>
    <StateProvName>Ohio</StateProvName>
    <CityTownName>Cincinnati</CityTownName>
    <Street>2875 Vine Street</Street>
    <PostalCode>45229</PostalCode>
    </Location>
    </Asset>
    <Asset>
    <ID>453051</ID>
    <AssetName>asset1</AssetName>
    <TypeName>Tape Backup</TypeName>
    <Status>Inactive</Status>
    <SerialNumber>s97032</SerialNumber>
    <Business>Sales</Business>
    <Vendor>Any vendor</Vendor>
    <Location>
    <CountryName>United States</CountryName>
    <StateProvName>Ohio</StateProvName>
    <Street>7683 Main Street</Street>
    <CityTownName>Cincinnati</CityTownName>
    <PostalCode>45492</PostalCode>
    </Location>
    </Asset>
    </AssetDetailsResponse>
    </soapenv:Body>
    </soapenv:Envelope>
    The following query works but the assets are strung together rather than on separate rows:
    SQL> SELECT extract(asset_xml, '//AssetName/text()') from gewscadb;
    EXTRACT(ASSET_XML,'//ASSETNAME/TEXT()')
    asset1asset1
    I have tried the following queries to return separate rows but they return “no rows selected”:
    SELECT a.asset_id, a.asset_name
    FROM assets,
    XMLTABLE('/Asset' PASSING assets.asset_xml
    COLUMNS asset_id VARCHAR2(20) PATH '/Asset/ID',
    asset_name VARCHAR2(30) PATH '/Asset/AssetName') a;
    SELECT a.asset_id, a.asset_name
    FROM assets,
    XMLTABLE('/AssetDetailsResponse'
    PASSING assets.asset_xml
    COLUMNS asset_id VARCHAR2(20) PATH '/AssetDetailsResponse/Asset/ID',
    asset_name VARCHAR2(30) PATH '/AssetDetailsResponse/Asset/AssetName') a;
    I suspect there is a problem with my path names in these queries. Can someone please provide some guidance on how I can get a separate row for each asset?

    Hi,
    You must use a double slash to extract assets nodes :
    WITH assets AS (
    SELECT xmltype('<soapenv:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <soapenv:Header/>
    <soapenv:Body>
    <AssetDetailsResponse>
    <Asset>
    <ID>44535</ID>
    <AssetName>asset1</AssetName>
    <TypeName>Server</TypeName>
    <Status>Active</Status>
    <SerialNumber>jk823</SerialNumber>
    <Business>Finance</Business>
    <Vendor>hewlett packard</Vendor>
    <Location>
    <CountryName>United States</CountryName>
    <StateProvName>Ohio</StateProvName>
    <CityTownName>Cincinnati</CityTownName>
    <Street>2875 Vine Street</Street>
    <PostalCode>45229</PostalCode>
    </Location>
    </Asset>
    <Asset>
    <ID>453051</ID>
    <AssetName>asset1</AssetName>
    <TypeName>Tape Backup</TypeName>
    <Status>Inactive</Status>
    <SerialNumber>s97032</SerialNumber>
    <Business>Sales</Business>
    <Vendor>Any vendor</Vendor>
    <Location>
    <CountryName>United States</CountryName>
    <StateProvName>Ohio</StateProvName>
    <Street>7683 Main Street</Street>
    <CityTownName>Cincinnati</CityTownName>
    <PostalCode>45492</PostalCode>
    </Location>
    </Asset>
    </AssetDetailsResponse>
    </soapenv:Body>
    </soapenv:Envelope>') asset_xml
    FROM dual
    SELECT a.asset_id, a.asset_name
    FROM assets,
    XMLTABLE(
    '//Asset' -- << Here
    PASSING assets.asset_xml
    COLUMNS asset_id VARCHAR2(20) PATH '/Asset/ID',
             asset_name VARCHAR2(30) PATH '/Asset/AssetName'
    ) a;

  • Updating ROW and inserting multiple row

    Hello,
    I needed some help.
    Firstly, i have VO which has 2 EO, these 2 EO are linked with association.
    In my page, i have a table, which by default has one row, and few fields can be edited, on click of "Apply" i want to commit this data,
    but when i use " getOADBTransaction().commit();" it gives me primary key constraint error.
    Secondly, when i click on add row button, it adds new row with unique primary key, also copying few attributes from existing first row.
    So, now when i want to update this table, since this VO is based on 2 EO's which are linked , i can't insert completely since in second EO parent EO's primary key is not inserted.
    Please help.

    I created new VO.
    It is EO based.
    Again, Commit is not working.
    code is
    public void create_row()
    SplitAtsVOImpl svo = getSplitAtsVO1();
    Row row = svo.first();
    Row r = svo.createRow();
    for(int i =1;i<row.getAttributeCount();i++)
    {System.out.println(i+"          "+row.getAttribute(i));
               if(row.getAttribute(i)!=null&&i<27)
             r.setAttribute(i,row.getAttribute(i).toString());
    r.setAttribute("DispAssNum",""+r.getAttribute("AssetNum")+"-"+count);
    r.setAttribute("AtsAssetId",getOADBTransaction().getSequenceValue("ATS_ASSET_TBL_S").toString());
    System.out.println(r.getAttribute("AtsAssetId"));
    r.setNewRowState(Row.STATUS_INITIALIZED);
    //r.setAttribute("AtsAssetId1",(""+row.getAttribute("AtsAssetId")));
    System.out.println(svo.getRowCount());
    svo.insertRowAtRangeIndex(0,r);
    try
    getOADBTransaction().commit();
    catch(OAException e)
    System.out.println(e.toString());
    }

  • How to get multiple row data in single row for one value of foreign key

    i want to get data from a table in a way that all the emp_id corresponding to one manager_id
    in employee table come in one row. (emp_id is the primary key and manager_id is the foreign key) Since there are different emp_id whose manager_id is same
    so how can i get all the emp_id in one row .

    One way with 10g:
    select mgr,
           rtrim(xmlagg(xmlelement(empno,empno||',').extract('//text()')),',')  emps
    from emp
    where mgr is not null
    group by mgr;10g:
    -- define this function:
    create or replace
    function concatenate(c Sys_refcursor, sep varchar2 default null) return varchar2
    as
      val varchar2(100);
      return_value varchar2(4000);
    begin
    --  open c;
      loop
      fetch c into val;
      exit when c%notfound;
      if return_value is null then
        return_value:=val;
      else
        return_value:=return_value||sep||val;
      end if;
      end loop;
      return return_value;
    end;
    select mgr,
           concatenate(cursor(select empno from emp e where e.mgr=emp.mgr order by empno),',')
    from emp
    where mgr is not null
    group by mgr;With 11g:
    select mgr,
           listagg(empno,',') within group (order by empno) emps
    from emp
    where mgr is not null
    group by mgr;

  • Getting multiple row value on valuechange of selectBooleanCheckbox in table

    Hello All,
    I am using jDeveloper 11.1.1.5. I have a java class which is returning me a list. I have created a data control of my class and I am using it on my page as a table.
    On my page I have inserted a text box selectedamount. In my table there are 4 columns Type, Qty, Amount and one boolean value select. I have changed column select to selectBooleanCheckbox. and I have specified its value as true(when selected) and false(when deselected). Which is getting reflected in my pagedef file.
    There are 4 rows coming in table and displaying properly.
    Now my requirement is on value change of selectBooleanCheckbox if user selects the rows I want to add the Amount for the selected row and I have to set it to the text box selectedamount.
    On value change of selectBooleanCheckbox I have written a method. Code snippet is like this:
    +public void valueChanged(ValueChangeEvent valuechangeevent) {+
    +if (valuechangeevent.getNewValue() == valuechangeevent.getOldValue()) {+
    System.out.println("new value is same as old value");
    +} else {+
    System.out.println("************************new value is other than old value**********************************");
    DCBindingContainer bindings =(DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding iter = bindings.findIteratorBinding("NAME OF MY ITERATOR");
    float temp2 = 0;
    Row currentRow ;
    int count = (int)iter.getViewObject().getEstimatedRowCount();
    for (int i=1; i<=count;i++) {
    currentRow =   iter.getRowAtRangeIndex(i);
    +if(currentRow != null) {+
    if(true == currentRow.getAttribute("select"))
    +{+
    temp2= temp2 + Float.parseFloat(currentRow.getAttribute("totAmount").toString());
    System.out.println("value of total amount after adding is :: "+ temp2);
    +}+
    +}+
    +}+
    After this I am setting temp2 to selectedamount textbox.
    But I am not getting the desired value in the textbox.
    Is there any other method I can achieve this.
    Thanks
    Navin K

    Inside f(currentRow != null) When I added
    System.out.println(currentRow.getAttribute("select"));
    It is showing as null.
    So select attribute is not getting assigned as true or false while checking and unchecking selectboolean checkbox.
    Am I missing something ?

  • Single Row out of multiple Rows

    entID sourceAID sourceA
    100 123123 DFW
    100 34343 NYC
    100 343434 MIA
    100 42222 SA
    200 123 DFW
    200 343 NYC
    200 422 SA
    The example above is just a small subset of over 1000 records.
    Is there a way I can get the data returned as such? The column positions do not matter, I just want the entID to always be in the same row.
    100 123123 DFW 34343 NYC 343434 MIA 42222 SA
    200 123 DFW 343 NYC 422 SA
    Thanks for any ideas!

    >
    I had a table1 ,in which there is a column as address ,having the data like 'address1|address2|address3|city|state|postal|country' (the data with pipe delimiter).
    Now,i have to insert this column into multiple columns in another table2 using sql query .So,i want to split the one column based upon the
    delimiter and insert the data into multiple fields in another table.Basically, you have a pipe delimited file that you wish to put into a table.
    This is what External Tables were made for.
    First: create or replace directory WORKDIR as '/tmp';
    CREATE TABLE Address_ext       <===== I find adding ext is good for one's sanity
    Address1  VARCHAR2(50),            <========== in ext tables, datatype has to be VARCHAR2 because you don't know what's coming in.
    Address2  VARCHAR2(50),
    Address3  VARCHAR2(15),
    City            VARCHAR2(30),
    Postal        VARCHAR2(10),
    Country     VARCHAR2(25),
    ORGANIZATION EXTERNAL
      type oracle_loader
      default directory WORKDIR
      access parameters
        records delimited by newline
        fields terminated by '|'
        missing field     values are null
        badfile 'tester.bad'
        logfile 'tester.log'
      location ('my_datafile.dat')
    reject limit unlimited;Then you do something like this
    INSERT INTO Address_Tbl
    SELECT * FROM Address_ext
    COMMIT;You might want to have a staging table or something if you have to check if Postal Codes are
    valid, the City is in a City table that you might have or whatever...
    Example of what I did Sysstat is my Oracle normal table, Sysstat_ext is my external table. I
    was able to do the processing directly in SQL since it was a fairly simple conversion.
    INSERT INTO Sysstat
    SELECT ROUND(TO_DATE  (Sysstat_ext.M_Time, 'DD-MM HH24:MI:SS'), 'MI') AS "Measurement Time",
           ROUND(TO_NUMBER(Sysstat_ext.Usr_pct),    0) AS "% Usr",
           ROUND(TO_NUMBER(Sysstat_ext.Sys_pct),    0) AS "% System",
           ROUND(TO_NUMBER(Sysstat_ext.Idle_pct),   0) AS "% Idle",
           ROUND(TO_NUMBER(Sysstat_ext.Wait_pct),   0) AS "% Wait",
           ROUND(TO_NUMBER(Sysstat_ext.HW_intpt),   0) AS "HW interrupts",
           ROUND(TO_NUMBER(Sysstat_ext.SW_intpt),   0) AS "SW interrupts",
           ROUND(TO_NUMBER(Sysstat_ext.Bytes_r),    0) AS "Bytes Read",
           ROUND(TO_NUMBER(Sysstat_ext.Bytes_w),    0) AS "Bytes Written",
           ROUND(TO_NUMBER(Sysstat_ext.Pages_in),   0) AS "Pages in",
           ROUnD(TO_NUMBER(Sysstat_ext.Pages_out),  0) AS "Pages out",
           ROUND(TO_NUMBER(Sysstat_ext.Bytes_rec),  0) AS "Bytes received",
           ROUND(TO_NUMBER(Sysstat_ext.Bytes_sent), 0) AS "Bytes sent",
           ROUND(TO_NUMBER(Sysstat_ext.Interrupts), 0) AS "Interrupts",
           ROUND(TO_NUMBER(Sysstat_ext.Cont_sw),    0) AS "Context switches"
    FROM Sysstat_ext;
    COMMIT;HTH,
    Paul...

  • Single colunm convert to multiple rows

    Hi
    my requirement is
    create table t1(col1 varchar2(20));
    insert into t1 values('a,b,c,d,e');
    my output:
    a
    b
    c
    d
    e
    please using simple sql query
    THANKS
    sunil.p

    Welcome to the forum.
    Here's an idea:
    SQL> create table t1(col1 varchar2(20));
    Table created.
    SQL>
    SQL> insert into t1 values('a,b,c,d,e');
    1 row created.
    SQL>
    SQL> select regexp_substr (col1, '[^,]+', 1, rn) output
      2  from   t1
      3  cross join (select rownum rn
      4              from ( select max (length (regexp_replace (col1, '[^,]+')))+1 mx
      5                     from   t1
      6                   )
      7              connect by level <= mx
      8             )
      9  where regexp_substr (col1, '[^,]+', 1, rn) is not null;
    OUTPUT
    a
    b
    c
    d
    eSee:
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:2189860818012
    http://nuijten.blogspot.nl/2011/08/splitting-comma-delimited-string-regexp.html
    http://nuijten.blogspot.nl/2009/07/splitting-comma-delimited-string-regexp.html
    for more examples and check out the SQL and PL/SQL FAQ as well:
    SQL and PL/SQL FAQ
    Edited by: Hoek on Nov 26, 2012 1:41 PM fixed asktom link

Maybe you are looking for

  • JFileChooser/FileDialog TextField selections

    I have a program which will use file extension for file type associations. What I want is when a user views the Dialog to save a file, this file extension to be in the FileDialog/JFileChooser, but unselected. An example of this would be when the user

  • Count attachments in document library

    got a infopath form library with a form that allows multiple attachments  - currently there's submitted 342 forms all with some attachments (one form has 3 attachments another 16 attachments)  can I create a view that counts (sum up) the numbers of a

  • BAPI_ACC_INVOICE_RECEIPT_POST balance error

    Hi. I've read all the posts I can find about this BAPI. I want to post an invoice, but seem to be a problem somewhere.. Is there anyone who had such a problem or can help me please? Thanks. The header is like this:   gd_documentheader-obj_type   = 'B

  • Why can't I select and drag files around in the preview area?

    Out of nowhere.  I have had no issues and now it is pretty much unusable.  I thought maybe it was a bug so I uninstalled/reinstalled.,  There was an update when I went to install it the second time.  I thought the update would help but there's no cha

  • Airport Express does not show up under 10.3.9 - but shows up under 10.4.9

    Hi my Room Mate uses an PowerBook with 10.3.9 and was able to use his Airport Express before without any problem. Without any reason the Airport disappeared from the options in his list in the taskbar, also looking for preferred networks does not sho