Extract duplicate rows and append them in single column

hi,
my requirement is i have the data in a table like below
GIVEN DATA
req_id res_id
100 200
100 201
101 300
102 200
102 400
102 null
THE OUTPUT SHOULD BE
req_id res_id
100 200,201
101 300
102 200,400
can anybody please help me out in writing the query to get the desired output.
*****NOTE: REMEMBER THERE ARE 100'S OF RECORDS IN THE TABLE THE ABOVE IS ONLY SAMPLE DATA.
Thanks in advance
Best Regards,

SQL>  with t as
  2   (select 100 req_id,200 res_id from dual union all
  3    select 100,null from dual union all
  4    select 100,201 from dual union all
  5    select 100,null from dual union all
  6    select 101,null from dual union all
  7    select 101,null from dual)
  8   select req_id,
  9     ltrim(max(sys_connect_by_path(res_id,'-')),'-') res_id
10   from(
11      select req_id,res_id,
12        row_number() over(partition by req_id order by res_id nulls first) rn
13      from t)
14   start with rn = 1
15   connect by  rn = prior rn + 1
16   and  req_id = prior req_id
17   group by req_id;
    REQ_ID RES_ID
       100 200-201
       101                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Similar Messages

  • How to split multivalues in Search refiners and show them as single value.

    How to split multivalues in Search refiners and show them as single value.
    I have values in refinement panel like "KA;#XA;#BA" and I want to show them as
    KA
    XA
    BA
    Any help will be greatly appreciated.
    Thanks in advance...
    BKPA

    Hi Baskaran,
    From your description, I understand you would like separator in multi-value refiner. I found some similar cases for your reference:
    http://searchunleashed.wordpress.com/2011/08/19/working-with-fast-search-for-sharepoint-and-multivalued-properties/#create-custom-processing-component
    http://searchunleashed.wordpress.com/2011/08/19/working-with-fast-search-for-sharepoint-and-multivalued-properties/
    http://sharepoint.stackexchange.com/questions/79289/refiners-for-multi-valued-managed-properties-in-sharepoint
    Regards,
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected] .
    Rebecca Tu
    TechNet Community Support

  • SQL*Loader - How to combine Flat File 3 columns and put into one single column

    Receive a flat file delimited by comma. Want to combine Flat File last 3 columns and put into one single column(Table).
    e.g.
    Flat File
    100,239,30,20,30
    While inserting into table want to combine last 3 columns and insert into invoice number column.
    302030

    It is not possible to combine the last 3 columns as those columns are seperated by commas and in the SQL Loader control file you must ve specified COMMA as an delimiter. So u better have all the columns in the table plus add one more column which holds the concatenation of the 3 columns.
    Vijay

  • Hide duplicate row and analytic functions

    Hi all,
    I have to count how many customers have two particular product on the same area.
    Table cols are:
    AREA
    PRODUCT_CODE (PK)
    CUSTOMER_ID (PK)
    QTA
    The query is:
    select distinct area, count(customer_id) over(PARTITION BY area)
    from all_products
    where product_code in ('BC01007', 'BC01004')
    group by area, customer_id
    having ( sum(decode(FPP.PRODOTTO_CODE,'BC01007',qta,0)) ) > 0)
    and ( sum(decode(FPP.PRODOTTO_CODE,'BC01004',qta,0)) ) > 0);
    In SQL*PLUS works fine, but in Oracle Discoverer I can't get distinct results also if I chek "Hide duplicate rows" in Table Layout .
    Anybody have another way to get distinct results for analytic function results?
    Thanks in advance,
    Giuseppe

    The query in Disco is exactly that I've post before.
    Results are there:
    AREA.........................................C1
    01704 - AREA VR NORD..............3
    01704 - AREA VR NORD..............3
    01704 - AREA VR NORD..............3
    01705 - AREA VR SUD.................1
    02702 - AREA EMILIA NORD........1
    If I check "hide duplicate row" in layout option results didn't change.
    If I add distinct clause manually in SQL*PLUS the query become:
    SELECT distinct o141151.AREA as E141152,COUNT(o141151.CUSTOMER_ID) OVER(PARTITION BY o141151.AREA ) as C_1
    FROM BPN.ALL_PRODUCTS o141151
    WHERE (o141151.PRODUCT_CODE IN ('BC01006','BC01007','BC01004'))
    GROUP BY o141151.AREA,o141151.CUSTOMER_ID
    HAVING (( SUM(DECODE(o141151.PRODUCT_CODE,'BC01006',1,0)) ) > 0 AND ( SUM(DECODE(o141151.PRODUCT_CODE,'BC01004',1,0)) ) > 0)
    and the results are not duplicate.
    AREA.........................................C1
    01704 - AREA VR NORD..............3
    01705 - AREA VR SUD.................1
    02702 - AREA EMILIA NORD........1
    There is any other way to force distinct clause in Discoverer?
    Thank you
    Giuseppe

  • Will Match remove duplicate songs and duplicate albums and make them into one?

    I have a ton of songs and albums that are like that. Some albums have differnet artwork too. Will match compare these to itunes and make them all unified?

    The only exception is that If it finds an *exact* duplicate (tags and all), it will not upload it; however, it will still leave both copies in your original library (one will have a little cloud with a line through it next to it).

  • Duplicate rows and data across multiple pages.

    My form has 12 pages (each page = 1 month). With a loop, the pages are hidden until the corresponding button is clicked and it becomes visible (Thanks Assure Dynamics for a great solution to a very long form).
    In Month 1, I have a table with a repeating row. What I would like to do is copy the repreating row and it's data to Month 2. Then I would like to have the table from Month 2, duplicate to Month 3, Month 3 to Month 4 and so on.
    I have been able to get the row from Month 1 to duplicate in Month 2 on the exit event of each cell in the row, however, when you are in Month 2 and do not change a cell which was created in Month 1, the data does not duplicate into the next month (Month 3). Instead of on the exit event of the cell(field), I thought placing it on a button would work but it is not.
    This is what I used on the exit event in the table for Month 1:
    xfa.resolveNode("Month2.Performancegoals2.updates.details[" + this.parent.index + "]").projectName.rawValue = this.rawValue;
    I also thought instead of using a table and a repeating row, I could place the information in a repeating subform but I am still stuck with how to copy the subform and its completed data to the next month.
    I am really stuck and have been looking for hours for a solution. Can anyone help, I am out of time for the deadline of this form.?

    Hi,
    Firstly,you must do the count of the table.
    frmTableBlock.tblTableMonth2._rowItem.count = frmTableBlock.tblTableMonth1._rowItem.count
    frmTableBlock.tblTableMonth12._rowItem.count = frmTableBlock.tblTableMonth1._rowItem.count
    And write the code which is do you want to copy the data Month1 to month12.
    I hope
    S,Candy

  • Selecting duplicate rows based on a combination of columns as key

    Hi ,
    I have a table with 5 columns.
    Code ID S_DATE E_DATE Name
    1 23 01012001 null ABC
    1 09 01012001 null XYZ
    2 81 04022007 null TVU
    1 43 03092008 null XXX
    Now, I need write a select query to fetch the duplicate rows from the above table having the combination of (Code, S_DATE,E_DATE) as the key.
    So from the above example, I need to get Row1 and Row2 as output (but not Row3 as it has a different S_DATE)
    Thanks in advance for your suggestions.
    Thanks
    Edited by: thotaramesh on Mar 9, 2009 4:54 PM

    On XE;
    WITH sample_data AS (
       SELECT 1  code,23 ID, '01012001' s_date, null e_date, 'ABC' NAME FROM dual UNION ALL
       SELECT 1, 09, '01012001', null, 'XYZ' FROM dual UNION ALL
       SELECT 2, 81, '04022007', null, 'TVU' FROM dual UNION ALL
       SELECT 1, 43, '03092008', null, 'XXX' FROM dual)
    SELECT code, ID, s_date, e_date, NAME
    FROM (
       SELECT
          sample_data.*,
          COUNT(*) over (PARTITION BY code, s_date, e_date) dups
       FROM sample_data)
    WHERE dups > 1;
          CODE         ID S_DATE   E_DATE NAME
             1         23 01012001        ABC
             1          9 01012001        XYZ

  • How do I identify my Duplicate Photos and Delete them?

    Don't ask me how it happended but I have managed to get a LOT of duplicate photos in my iphoto library.
    How can I identify those duplicates and then delete them automatically.
    An example of a duplicate would be: IMG12345.jpg and IMG12345_1.jpg etc
    Thanks,
    Steve

    Duplicate annihilator
    LN

  • Multiple rows Converge to Single row and join

    Hi Folks,
    I am facing a tricky challenge to join a table with multiple rows and converge into a single row (based on ID, period) and join with another table to get a single row. Let me explain.
    Table 1: DTL_TABLE (id, period, course, names, title, type)
    1 2010 mat john null null
    1 2010 mat jim null null
    1 2010 cam null officer null
    1 2010 cam null Prof null
    1 2010 phy null null Inclass
    1 2010 phy null null Online
    Join with
    Table 2: ID_TABLE(id, period, Loc, Dept, Code)
    1 2010 nj 101 CC.
    Output format (id, period, course, names, title, type, Loc, Dept, Code)
    result : 1 2010 mat,cam,phy john,jim officer,prof inclass,online nj 101 CC
    I have created all the DDLs and DMLs if that help. Kindly let me know if a Join SQL query is possible.
    Thank you,
    Aj
    CREATE TABLE DTL_TABLE
       ids      VARCHAR2 (10),
       period   VARCHAR2 (10),
       course   VARCHAR2 (10),
       names    VARCHAR2 (10),
       title    VARCHAR2 (10),
       TYPE     VARCHAR2 (10)
    INSERT INTO DTL_TABLE
         VALUES ('1',
                 '2010',
                 'mat',
                 'jim',
                 NULL,
                 NULL);
    INSERT INTO DTL_TABLE
         VALUES ('1',
                 '2010',
                 'mat',
                 'john',
                 NULL,
                 NULL);
    INSERT INTO DTL_TABLE
         VALUES ('1',
                 '2010',
                 'mat',
                 'kale',
                 NULL,
                 NULL);
    INSERT INTO DTL_TABLE
         VALUES ('1',
                 '2010',
                 'cam',
                 NULL,
                 'officer',
                 NULL);
    INSERT INTO DTL_TABLE
         VALUES ('1',
                 '2010',
                 'cam',
                 NULL,
                 'prof',
                 NULL);
    INSERT INTO DTL_TABLE
         VALUES ('1',
                 '2010',
                 'phy',
                 NULL,
                 NULL,
                 'inclass');
    INSERT INTO DTL_TABLE
         VALUES ('1',
                 '2010',
                 'phy',
                 NULL,
                 NULL,
                 'online');
    COMMIT;
    CREATE TABLE id_table
       ids      VARCHAR2 (10),
       period   VARCHAR2 (10),
       loc      VARCHAR2 (10),
       dept     VARCHAR2 (10),
       code     VARCHAR2 (10)
    INSERT INTO id_table
         VALUES ('1',
                 '2010',
                 'nj',
                 '101',
                 'cc');
    COMMIT;

    Aj09 wrote:
    Hi Folks,
    I am facing a tricky challenge to join a table with multiple rows and converge into a single row (based on ID, period) and join with another table to get a single row. Let me explain.
    Table 1: DTL_TABLE (id, period, course, names, title, type)
    1 2010 mat john null null
    1 2010 mat jim null null
    1 2010 cam null officer null
    1 2010 cam null Prof null
    1 2010 phy null null Inclass
    1 2010 phy null null Online
    Join with
    Table 2: ID_TABLE(id, period, Loc, Dept, Code)
    1 2010 nj 101 CC.
    Output format (id, period, course, names, title, type, Loc, Dept, Code)
    result : 1 2010 mat,cam,phy john,jim officer,prof inclass,online nj 101 CC
    I have created all the DDLs and DMLs if that help. Kindly let me know if a Join SQL query is possible.
    SELECT TBL.id,
           DTLperiod,
           course,
           names,
           title,
           TYPE,
           Loc,
           Dept,
           Code
    FROM   ID_TABLE TBL,
           DTL_TABLE DTL
    WHERE  TBL.ID = DTL.ID
           AND TBL.PERIOD = DTL.PERIOD; it not good to use RESERVED WORDS like "ID" or "TYPE" as column names

  • [Forum FAQ] SharePoint 2013: Extracting values from a multi-value enabled lookup column and merge values to a multi-value enabled column

    For some business requirements, users want to extract values from a multi-value enabled lookup column
    and add items to another list based on each separate value. In contrast, others want to find duplicate values in the list and merge associated values to a multi-value enabled column and then
    add items to another list based on the merged value. All of these can be achieved using SharePoint Designer 2013 Workflow.
    How to extract values from a multi-value enabled lookup column and add items to another list based
    on each separate value using SharePoint Designer 2013.
    Important actions: Loop Shape; Utility Actions
    Three scenarios
    Things to note
    Steps to create Workflow
    How to merge values to a multi-value enabled column and add item to another list based on the
    merged value using SharePoint Designer 2013.
    Important actions: Call HTTP Web Service; Build Dictionary
    Things to note
    Steps to create Workflow
    How to
    extract values from a multi-value enabled lookup column and
    add items to another list based on each separate value using SharePoint Designer 2013.
    For example, they have three lists as below. They want to
    extract values from the Destinations column
    in Lookup2 and add items to Lookup3 based on each country and set Title to current item: ID.
    Lookup1:
    Title (Single line of text)
    Lookup2:
    Title (Single line of text), Destinations (Lookup; Get information from: Lookup1 in Title column).\
    Lookup3:
    Title (Single line of text), Country (Single line of text).
    Important action
    1. Loop Shape: SharePoint Designer 2013 support two types of loops: loop n times and loop with condition.
    Loops must also conform to the following rules:
    Loops must be within a stage, and stages cannot be within a loop.
    Steps may be within a loop.
    Loops may have only one entry and one exit point.
    2. Utility Actions: It contains many actions, such as ‘Extract Substring from Index of String’ and ‘Find substring in String’.
    Three scenarios
    We need to loop through the string returned from the look up column and look for commas. There are three
    scenarios:
    1.  No comma but string is non-empty so there is only one country.
    2.  At least one comma so there is at least two or more countries to loop.
    3.  In the loop we have consumed all the commas so we have found the last country. 
    Things to note
    There are two things to note:
    1. "Find string in string (output to Variable:index)"  will return -1 if doesn't find
    the searched for string.
    2. In the opening statement "Set Variable: Countries to Current Item:Destinations" set the return
    field as  "Lookup Values, Comma Delimited".
    Steps to create Workflow
    Create a custom list named Lookup1.
    Create a custom list named Lookup2, add column: Destinations (Lookup; Get information from: Lookup1 in Title column).
    Create a custom list named Lookup3, add column: Country (Single line of text).
    Create a workflow associated to Lookup2.
    Add conditions and actions:
    Start the workflow automatically when an item is created.
    Add item to Lookup2, then workflow will be started automatically and create multiple items to lookup3.
    See the below in workflow History List:
    How to merge values to a multi-value enabled column and add item to another list based on the
    merged value using SharePoint Designer 2013
    For example, they have three lists as below. They want to find duplicate values in the Title column in
    Lookup3 and merge country column to a multi-value enabled column and then add item to lookup2 and set the Title to Current Item: Title.
    Lookup1:
    Title (Single line of text)
    Lookup3:
    Title (Single line of text), Country (Single line of text).
    Lookup2:
    Title (Single line of text), Test (Single line of text).
    Important actions
    "Call HTTP Web Service"
    action: In SharePoint 2013 workflows, we can call a web service using a new action introduced in SharePoint 2013 named Call HTTP Web Service. This action
    is flexible and allows you to make simple calls to a web service easily, or, if needed, you can create more complex calls using HTTP verbs as well as allowing you to add HTTP headers.
    “Build Dictionary"
    action:
    The Dictionary variable type is a new variable type in the SharePoint 2013 Workflow.
    The following are the three actions specifically designed for the Dictionary variable type: Build Dictionary, Count Items in a Dictionary and Get an Item from a Dictionary.
    The "Call HTTP Web Service" workflow action would be useless without the new "Dictionary" workflow action.
    Things to note
    The
    HTTP URI is set to https://sitename/_api/web/lists/GetByTitle('listname')/items?$orderby=Id%20desc and the HTTP method is set to “GET”. Then the list will be sort by Id in descending order.
    Use Get
    d/results(0)/Id form
    Variable: ResponseContent (Output to
    Variable: maxid) to get the Max ID.
    Use Set
    Variable: minid to Current List:ID to get the Min ID.
    Use Copy from
    Variable: destianation , starting at
    1 (Output to
    Variable: destianation) to remove the space.
    Steps to create Workflow
    Create a custom list named Lookup1.
    Create a custom list named Lookup2, add column: Test (Single line of text).
    Create a custom list named Lookup3, add column: Country (Single line of text).
    Create a workflow associated to Lookup3.
    Add a new "Build Dictionary" action
    to define the http request header:
    Add a Call HTTP Web Serviceaction, click on
    this and paste your http request.
    To associate the
    RequestHeader variable, select the Call action property,
    set the
    RequestHeaders property to
    RequestHeader:
    In the Call action, click on
    response and associate the response to a new
    variable: ResponseContent (of type Dictionary).
    After the Call action add Get item from Dictionary action to get the Max ID.
    Add Set Workflow Variable action to get the Min ID.
    Add Loop Shape (Loop with Condition) to get all the duplicate titles and integrate them to a string.
    Create item in Lookup2.
    The final Stage should look like this:
    Start the workflow automatically when an item is created.
    Add item to Lookup3, then workflow will be started automatically and create item to lookup2.
    See the below in workflow History List:
    References
    SharePoint Designer 2013 - Extracting values from a multi-value enabled lookup column into a dictionary as separate items:
    http://social.technet.microsoft.com/Forums/en-US/97d34468-1b53-4741-88b0-958472f8ca9a/sharepoint-designer-2013-extracting-values-from-a-multivalue-enabled-lookup-column-into-a
    Workflow actions quick reference (SharePoint 2013 Workflow platform):
    http://msdn.microsoft.com/en-us/library/jj164026.aspx
    Understanding Dictionary actions in SharePoint Designer 2013:
    http://msdn.microsoft.com/en-us/library/office/jj554504.aspx
    Working with Web Services in SharePoint 2013 Workflows using SharePoint Designer 2013:
    http://msdn.microsoft.com/en-us/library/office/dn567558.aspx
    Calling the SharePoint 2013 Rest API from a SharePoint Designer Workflow:
    http://sergeluca.wordpress.com/2013/04/09/calling-the-sharepoint-2013-rest-api-from-a-sharepoint-designer-workflow/

    GREAT info, but it may be helpful to note that when replacing a portion of the variable "Countries" with a whitespace character, you may cause the workflow to fail in a few specific cases (certain lookup fields will not accept this and will automatically
    cancel).  I only found this out when recreating your workflow on a similar, but much more complex list set.  
    To resolve this issue, I used another utility action (Extract Substring from Index of List) to clear out the whitespace.  I configured it as "Copy from
    Variable: Countries, starting at
    1 (Output to Variable: Countries), which takes care of this issue in those few cases.
    Otherwise, WOW!  AWESOME JOB!  Thanks!  :)

  • Wierd duplicate rows problem

    Hi,
    I've a partitioned table and when I query to extract primary keys for a particular month, I'm getting wierd results. Here is what is happening -
    SELECT colA, colB, colC
    FROM tableA partition(Y06M01)
    WHERE current = 'Y'
    -- This query is returning me some duplicate rows for colA, colB, colC when these columns form primary key on tableA. Note that, rowids for these rows are not repeating, which makes me think oracle is actually storing these duplicate rows on the drive.
    Now, for the values that are repeating in the above query, following query doesnt result in duplicate rows (note that I'm not mentioning partition name in the from clause) -
    SELECT colA, colB, colC
    FROM tableA
    WHERE current = 'Y'
    AND (
    (colA = <val1> AND colB = <val2> AND colC = <val3>)
    OR
    (colA = <val4> AND colB = <val5> AND colC = <val6>)
    OR
    (colA = <val7> AND colB = <val8> AND colC = <val9>)
    Does anyone know why such a thing is happening? is it some kind of internal oracle error?
    Thanks

    Answers to your questions
    FROM tableA partition(Y06M01)Why have you need to query against the partition instead of table level ?
    -- There's no need, but the rows that are repeating lie in this partition. Hence, querying against the partition or against the table should return same results.
    colA, colB, colC when these columns form primary key on tableAAre they a primary key created ?
    -- Yes there's is a primary key created on these columns.
    Anyway, have you just some example output to show us.
    -- Here is the sample output:
    Scenario I (If I query against the partition). In this case if i extract rowids, they are different for each of below selected 6 rows
    colA colB colC
    1 2 3
    4 5 6
    4 5 6
    4 5 6
    7 8 9
    7 8 9
    Scenario II (If I query against the table for values (1,2,3), (4,5,6) and (7,8,9))
    colA colB colC
    1 2 3
    4 5 6
    7 8 9
    Furthermore, generally, to see the duplicate rows, try this query :
    select colA, colB, colC, count(*)
    from tableA
    having count(*)>1;
    -- I did run this query and again if I query against the partition I see duplicate rows and when I query against the table there are no duplicate rows.

  • Delete duplicate rows -- based on 4 columns -- how?

    I asked this question on how to delete duplicates recently and received this suggestion which works well -- except --
    With CTE AS
    SELECT *, ROW_NUMBER() OVER (Partition by fld1 order by fld1) RowNum
    FROM #tmpA
    DELETE From CTE
    WHERE RowNum > 1
    -- the actual table I need to delete duplicate rows on is based on 4 columns.  The following table contains 14,462 rows of which 14,348 are distinct -- based on the following 4 colums.  Below is an image of a sample of the data contained in the
    table for my question and to the right of that data is the column structures (data types).  Is it possible to do something like the above example suggestion with the table in the image below?  How to do that?  I need to delete rows so that 14462
    goes down to 14348.  If I only reference one column for the delete -- this would delete like 7000+ rows.  I only need to remove 114 rows.
    Rich P

    Add the other 3 columns to the partition.
    Jason Long

  • Why is LR importing duplicate files and adding a -1 to file name?

    I need to locate some missing photos that disappeared from my library so I'm re-importing my photo collection again (from burnt DVD's) in hopes to recover all the missing images. When I insert a DVD to re-import the photo collection and choose "convert to DNG" and I check "do not import suspected duplicates" LR imports the same images that are already in the catalog and renames the images with a -1...for example, IMG_3664.dng is already in LR folder named 2008-06-14. When I re-import the images from that date, LR renames the image IMG_3664-1.dng and puts it in the same folder resulting in duplicate images side by side. Why is it importing the same image and adding a -1 to the file name?
    I was expecting it to tell me there are XXX photos already in the catalog but it doesn't. It just adds a -1 to the file name and imports all the duplicate images and displays them side by side in the grid view.
    Any ideas? I originally imported the images from the same DVD's I'm using now on a PC and placed the library on an external hard drive. NOw I'm using a new iMAC and I imported that same library from the same external drive location. I'm working with LR 1.31.
    Can someone help? LR should recognize the files with the identical date/time stamp and tell me it's already in the catalog...but it's not for some reason.
    Thanks

    If you import them again, you'll get a "-2" instead of -1, and the -2 will list with the -1,and the original with no dash. The higher number distinguishes the most recent file of same title..
    The file titles are identical as original, but it sounds as converting the file from the source,(PC, Hard drive) to DNG makes it another version of the file....do you type DNG in caps? should it be lower case?
    Because the computer doesn't read the file as a duplicate, but the file name is the same, you'll get a -1.
    This could probably happen,say, if your files are raw, and you had burned them as jpeg onto dvd storage. Even though you want them back as raw, converting them isn't duplicating them.
    I hope this helps...I don't even own Lightroom; I'm shopping around between this and Aperture right now...the experience I'm referring to is where I work in a pre-press printing house; So if someone replying to my post who masters in Lightroom calls me an idiot, I won't argue much!!

  • How to find duplicate row in sql query?

    Hi All,
    Please solve my query, find duplicate row and how to count its. your suggestion would be greatly appreciated.

    You can use group by and having.
    SQL> WITH t
      2       AS (SELECT       LEVEL id
      3                 FROM   DUAL
      4           CONNECT BY   LEVEL <= 5
      5           UNION ALL
      6           SELECT       LEVEL + 2
      7                 FROM   DUAL
      8           CONNECT BY   LEVEL <= 3)
      9  SELECT   *
    10    FROM   t;
            ID
             1
             2
             3
             4
             5
             3
             4
             5
    8 rows selected.
    SQL> WITH t
      2       AS (SELECT       LEVEL id
      3                 FROM   DUAL
      4           CONNECT BY   LEVEL <= 5
      5           UNION ALL
      6           SELECT       LEVEL + 2
      7                 FROM   DUAL
      8           CONNECT BY   LEVEL <= 3)
      9  SELECT     id, COUNT (*)
    10      FROM   t
    11  GROUP BY   id
    12    HAVING   COUNT (*) > 1;
            ID   COUNT(*)
             3          2
             4          2
             5          2
    SQL>

  • How to Handle the chaned rows and new added rows into ALV in OPPS alv .

    Hi All,
    I have developed a [program in which i am able to append a row or change and existing row.
    when i press save button and handle the user command in PAI of Screen, in the internal table of ALV some records are missing which are inserted in the last.
    Could You please guide me how can i handle the change rows and appended rows
    Regards,
    Deepak

    Hi ,
    as avinash said , u need to use check_changed_data Method in order to get all records ,
    code will be like this
    PAI
    user-command.
    case sy-ucomm.
    when 'ENTER'.
    call method G_grid->check_changed_data.
    call method g_grid->refresh_table_display.
    when 'SAVE'.
    call method G_grid->check_changed_data.
    call method g_grid->refresh_table_display.

Maybe you are looking for

  • Help required in First Servlet

    Hey Guys.....I have read the above thread all posts and as this is also my first Servlet so I am also getting java.lang.ClassNotFoundException: servlets.HelloWorldServlet Now in my Apache tomcat folder C:\apache-tomcat-6.0.16\webapps\ServletExamples

  • Can I move photos from the Camera Roll to a new Albumn (not to add)?

    I added some photos from Camera Roll to a new albumn and now I have two copies in two albumn. I tried to delete those photos from Camera Roll and the photos in the new albumn are also deleted. Can I move them instead of adding them to the new albumn?

  • Undefined __1c2N6FL_pv_

    I have a shared library built on Solaris 5.7 using CC: Forte Developer 7 C++ 5.4 Patch 111715-13 2003/12/11 with the following compile/link options CC -c -features=no%conststrings -g -xs -xarch=generic64 -KPIC \ -o etxctl.o etxctl.C CC -g -xs -xarch=

  • Steps to create a flashlight app

    I would like to create an Iphone app that includes a flashlight within it. Any help?

  • How to map business scenario in CS

    Hi all, My client want to implement CS , but there business is to provide repair service , not manufacturing . Eg  AC repairing service only  they are not manufacturing ACs. then how to take material in stock to repair it & deliver it to customer aft