How i can display multiple row from one row

Hi ,
i have table called temp_probabaility and contain 2 colomns (id1 , path )the values as below ,
ID1 Path
3 ;2,4,6
4 ;1;2;3;5
5 ;1;2;3;4;5
i need to convert the values to be like below ,
id1 path
3 2
3 4
3 6
4 1
4 2
4 3
4 5
please any help ?
Edited by: user11309581 on May 13, 2011 4:13 PM
Edited by: user11309581 on May 13, 2011 4:16 PM
Edited by: user11309581 on May 13, 2011 4:18 PM

BluShadow wrote:
it just needs to use the \d+ as you did.Not sure what you mean. Your code did not produce any rows for id1=6:
SQL> with x as (select 6 as id1, ';;;' path from dual)
  2  --
  3  -- end of test data
  4  --
  5  select id1, regexp_substr(path,'\d+',1,rn) as path
  6  from   x cross join (select rownum rn
  7                       from dual
  8                       connect by rownum <= (select max(length(regexp_replace(path,'[^;]'))) from x))
  9  where regexp_substr(path,'\d+',1,rn) is not null
10  order by 1,2
11  /
no rows selected
SQL> with t as (select 6 as id1, ';;;' path from dual)
  2  -- end of on-the-fly data sample
  3  select  id1,
  4          regexp_substr(path,'\d+',1,column_value) path
  5    from  t,
  6          table(
  7                cast(
  8                     multiset(
  9                              select  level
10                                from  dual
11                                connect by level <= length(regexp_replace(path,'[^;]'))
12                             )
13                     as sys.OdciNumberList
14                    )
15               )
16  /
       ID1 PAT
         6
         6
         6
SQL> Same when path is NULL:
SQL> with x as (select 6 as id1, '' path from dual)
  2  --
  3  -- end of test data
  4  --
  5  select id1, regexp_substr(path,'\d+',1,rn) as path
  6  from   x cross join (select rownum rn
  7                       from dual
  8                       connect by rownum <= (select max(length(regexp_replace(path,'[^;]'))) from x))
  9  where regexp_substr(path,'\d+',1,rn) is not null
10  order by 1,2
11  /
no rows selected
SQL> with t as (select 6 as id1, '' path from dual)
  2  -- end of on-the-fly data sample
  3  select  id1,
  4          regexp_substr(path,'\d+',1,column_value) path
  5    from  t,
  6          table(
  7                cast(
  8                     multiset(
  9                              select  level
10                                from  dual
11                                connect by level <= length(regexp_replace(path,'[^;]'))
12                             )
13                     as sys.OdciNumberList
14                    )
15               )
16  /
       ID1 P
         6
SQL> SY.

Similar Messages

  • How I can display the values in one row when they come from the same colum

    This query
    SELECT
    sorints_ints_code
    FROM
    saturn.sorints a,
    connman.cc_adm_prospect_master
    WHERE
    sorints_ints_code like 'Z%'
    and sorints_pidm = prospect_pidm
    give me the results of
    ZA
    ZB
    ZC
    I want to use this query in a cursor to update a column in another table, the problem is that I need to update the table concatenating the values ZA,ZB,ZC
    I have 24 different codes stored in the column sorints_ints_code, so I don’t want to use 24 different cursors and I don’t to use cross reference, It is there any way that I DON’T know to display the data like this za,zb,zc without using cross reference, I don’t want to use the table 24 times…
    Like THIS, this is only for two values…
    SELECT
    a.sorints_ints_code,
    b. sorints_ints_code
    FROM
    saturn.sorints a,
    saturn.sorints b
    connman.cc_adm_prospect_master
    WHERE
    a.sorints_ints_code = ‘ZA’
    AND a.sorints_ints_code = ‘ZB’
    and a.sorints_pidm = prospect_pidm
    and b.sorints_pidm = prospect_pidm
    REMEMBER, I have 24 different values
    I am trying to write a procedure like this;
    Someone suggest this v_int_code1 := v_int_code1||interest_coach_rec.sorints_ints_code;
    BUT IT IS NOT WORKING!!!
    PROCEDURE prospect_coach_interest_upd
    p_prospect_term_code IN srbrecr.srbrecr_term_code%TYPE,
    p_prospect_admin_err_code OUT VARCHAR2,
    p_ora_err_code OUT NUMBER,
    p_ora_err_msg OUT VARCHAR2
    ) IS
    v_out_path VARCHAR2(40) := '/home/connman/student';
    v_out_file VARCHAR2(40) := 'cc_adm_prospect_'||p_prospect_term_code||'_'||TO_CHAR(SYSDATE,'YYYYMMDDHH');
    v_file_handle UTL_FILE.FILE_TYPE;
    v_pidm NUMBER;
    v_int_code1 varchar2(30);
    v_int_code2 varchar2(2);
    v_int_code3 varchar2(2);
    CURSOR cur_pidms IS
    SELECT prospect_pidm
    FROM connman.cc_adm_prospect_master
    WHERE prospect_term_code = p_prospect_term_code
    FOR UPDATE;
    CURSOR interest_coach_cur is
    SELECT
    sorints_ints_code
    FROM
    saturn.sorints
    WHERE
    sorints_ints_code like 'Z%'
    and sorints_pidm = v_pidm ;
    interest_coach_rec interest_coach_cur%ROWTYPE;
    BEGIN
    UTL_FILE.FCLOSE_ALL;
    v_file_handle := UTL_FILE.FOPEN (v_out_path, v_out_file, 'a');
    UTL_FILE.PUT_LINE (v_file_handle,
    CHR (10) || TO_CHAR (SYSDATE, 'DD-MON-YYYY HH:MI:SS')
    UTL_FILE.PUT_LINE (v_file_handle, 'Entering the Admin Name procedure.');
    --- BEGIN
    FOR rec_pidms IN cur_pidms
    LOOP
    EXIT WHEN cur_pidms%NOTFOUND;
    v_pidm := rec_pidms.PROSPECT_pidm;
    v_int_code1 := v_int_code1||interest_coach_rec.sorints_ints_code;
    IF interest_coach_cur%ISOPEN
    THEN
    CLOSE interest_coach_cur;
    END IF;
    OPEN interest_coach_cur;
    FETCH interest_coach_cur
    INTO interest_coach_rec;
    IF interest_coach_cur%FOUND
    THEN
    UPDATE
    connman.cc_adm_prospect_master
    SET
    PROSPECT_COACH_INTEREST = interest_coach_rec.sorints_ints_code
    WHERE CURRENT OF cur_pidms;
    END IF;
    END LOOP;
    COMMIT;
    p_prospect_admin_err_code := '0';
    UTL_FILE.put_line (v_file_handle, 'Successful Completion.');
    EXCEPTION
    WHEN OTHERS
    THEN
    p_prospect_admin_err_code := '1';
    p_ora_err_msg := SUBSTR (SQLERRM, 1, 2000);
    p_ora_err_code := SQLCODE;
    END; -- prospect_coach_interest_upd;

    Search in the forum or web you will find many solutions
    Return multi-row result as one comma-delimited row
    http://www.oracle-developer.net/display.php?id=412

  • HT202724 How i can send multiple sms from mac without being a group message ?

    How i can send multiple sms from mac without being a group message ?

    Start new conversations, one for each recipient.

  • How we can get the values  from one screen to another screen?

    hi guru's.
         how we can get the values  from one screen to another screen?
              we get values where cusor is placed but in my requirement i want to get to field values from one screen to another screen.
    regards.
      satheesh.

    Just think of dynpros as windows into the global memory of your program... so if you want the value of a field on dynpro 1234 to appear on dynpro 2345, then just pop the value into a global variable (i.e. one defined in your top include), and you will be able to see it in your second dynpro (assuming you make the field formats etc the same on both screens!).

  • How i can copy the script from one language to other language

    dear all,
    how can i copy script i.e i changed =in EN, but i want copy convert same effects in DE (from one language to other language but not all language)

    hi,
    From the SAP standard menu, choose SE71.
    On the Form Painter: Request screen:
    1)Enter the name of the form (ZORDER01) in the Form field.
    2)Enter DE in the Language field.
    3)Click created and press OK.
    4)From menu bar, choose form->copy from
    5)In the popup, give formname as (ZORDER01) and language as EN and click ok.
    6)Save the form and activate it.
    Regards,
    Sailaja.

  • How do I select multiple messages from one sender in mobile email to delete them all at once?

    I know how to select all of the new messages and mark as read. Now how would I do that if I wished to delete all from one sender or have the same subject, after I search the sender or subject?

    Hey Koyster,
    Great question. Utilizing iCloud.com, we may be able to purge these emails in a much faster way:
    iCloud: Delete email
    http://support.apple.com/kb/PH2651
    Delete messages
    - On your Mac, Shift-click to select multiple adjacent messages or Command-click to select multiple nonadjacent messages.
    - On your Windows computer, Shift-click to select multiple adjacent messages or Control-click to select multiple nonadjacent messages.
    Thanks,
    Matt M.

  • How I can change my staff from one IPad To a New one

    Please I need To know how I can change my staff To a New IPad , I have 3 generation i pad and I just bought an IPad air

    Back them up to iCloud or a computer running the lastest version of iTunes. Give them unique names, and restore the proper back-up to each new device.

  • How i can download video clips from one site with Mozilla ?

    I want to download video clips from this site [http://www.sexodirecta.com sexo] , but i don't know how to do that.
    Are some plugins free availble for mozilla 3.6 that can do that ?

    The only voice over files I've come across had the audio file separate from the photo. Control-click on the thumbnail of the photo with the audio and select Show File from the Contextual Menu.  You'll be taken to that file's folder via the Finder.  See if there's an second file associated with the photo or what the extension of the file is.
    You may have to open the file with Quicktime Player Pro or iMovie and strip the audio from the file. Let us know what you find.
    OT

  • How do I print multiple images from one pdf?

    I am printing invitations, the image size is 6x6 and I'm printing on 12x18 paper.  Is there a fast/easy way in acrobat to place this mage multiple times?
    I have seen people at the print shop do something similar, but I have no idea what they're doing.

    Duplicate the image several times as new pages and then select "Multiple pages per sheet" under Page Scaling in the Print dialog.

  • Can I move pictures from one month to another?

    Hi there,
    I am trying to compose a calendar (easier said than done...) and I was wondering: if I have, say, March with certain photos, can I move them to, say, June? For now I am doing it all by hand which is a bit of a nuisance as I have discard what I have already chosen and pick up the "new" photos from a rather long list (thank goodness I have a shorter list of tagged photos).
    I don't know why, but it seems that the "compose calendar" option falls short in some basic things which I wouldn't have thought were rocket science...
    A.

    Hi TD,
    I don't think what you say works... I can drag a picture from a month to the side bar (where it gets "lost" amidst all the others) and from the side bar to another month, but I don't see how I can move/drag them from one month to another bypassing the side bar altogether.
    Cheers,
    A.

  • How do I move my pic from one app to another?

    How do can I move pics from one app to another?

    It all depends upon the apps. I would expect you can email it from one app. How you get it into the other depends upon the app.

  • How can i copy files from one external hard disk to another using macbook pro with retina display

    How can i copy files from one external hard drive to another using macbook pro with retina display?

    That's odd - if you open Disk Utility (Applications->Utilities) and select the disk(s), how are they formatted? If you're only going to be used with your Mac, they should be formatted as "Mac OS Extended (Journaled)".
    Clinton

  • Passing Multiple table row from one view to another view

    Hi,
    How to Passing Multiple table row from one view to another view in Web Dynpro Abap. (Table UI Element)
    thanx....

    Hi Ganesh,
    Kindly do search before posting.. this discussed many times..
    First create your context in component controller, and do context mapping in two views so that you can get values from
    one veiw to any views.
    and for multiple selection, for table we have property selection mode.. set as multi and remember context node selection
    selection cardinality shoud be 0-n.
    so, select n no of rows and based on some action call sec view and display data.( i think you know navigation between veiw ).
    Pelase check this...for multi selection
    Re: How to copy data from one node to another or fromone table to another table
    for navigation.. check
    navigation between the views
    Cheers,
    Kris.

  • I wanted to display the multiple rows in one row but column should be diff

    Hi
    Could any body help me regarding this query how to write to get the multiple rows in one row.
    eg.
    i have one table tab1(eno number,ename varchar2,uid1 varchar2,uid2 varchar2,uid3 varchar4)
    but when i am runing the query I am getting multiple record against one eno number because of uid1,uid2,uid3
    suppose value of table is
    eno ename uid1 uid2 uid3
    1 a u1
    1 a u2
    1 a u3
    when i am quering it is coming same as above but I want in one row
    eno ename uid1 uid2 uid3
    1 a u1 u2 u3
    can any onle help me how to write the query for this requirement.
    thanks
    saif

    which is hard coded in my code? Here another approach, but fail for c as there is no information for the value of a column: does 1 in u1 means col 1, etc.
    /* Formatted on 2012/05/29 16:29 (Formatter Plus v4.8.8) */
    WITH t AS
         (SELECT 1 col1, 'a' col2, 'u1' col3
            FROM DUAL
          UNION ALL
          SELECT 1 col1, 'a' col2, 'u2' col3
            FROM DUAL
          UNION ALL
          SELECT 1 col1, 'a' col2, 'u3' col3
            FROM DUAL
          UNION ALL
          SELECT 1 col1, 'b' col2, 'u1' col3
            FROM DUAL
          UNION ALL
          SELECT 1 col1, 'b' col2, 'u3' col3
            FROM DUAL
          UNION ALL
          SELECT 1 col1, 'b' col2, 'u2' col3
            FROM DUAL
          UNION ALL
          SELECT 1 col1, 'c' col2, 'u1' col3
            FROM DUAL
          UNION ALL
          SELECT 1 col1, 'c' col2, 'u3' col3
            FROM DUAL)
    SELECT   xx.col1, xx.col2, MAX (DECODE (xx.rn, 1, col3)) AS uid1, MAX (DECODE (xx.rn, 2, col3)) AS uid2,
             MAX (DECODE (xx.rn, 3, col3)) AS uid3
        FROM (SELECT t.col1, t.col2, t.col3, ROW_NUMBER () OVER (PARTITION BY col1, col2 ORDER BY col3) rn
                FROM t) xx
    GROUP BY col1, col2;output:
    COL1     COL2     UID1     UID2     UID3
    1     a     u1     u2     u3
    1     b     u1     u2     u3
    1     c     u1     u3
    Edited by: ʃʃp on May 29, 2012 2:30 AM

  • How i can combine multiple pdf files in one file using a macbook air

    how i can combine multiple pdf files in one file

    The application Preview.
    Preview Help.
    Save combined PDFs
    Open the PDFs you want to combine.
    In each open PDF, choose View > Thumbnails to display the pages of the PDF in the sidebar.
    Drag the thumbnails you want to add (Command-click to select noncontiguous pages) to the thumbnail sidebar in the other PDF.You can add pages to the end of the document or between pages in a document. Drag thumbnails to reorder them. You can also add a PDF file before or after another PDF document.
    Choose File > Export to save a new PDF containing all of the combined pages, or choose File > Save to replace the original version of the destination PDF with the version containing the combined pages.

Maybe you are looking for

  • [SOLVED] MySQL won't start

    Hi, I'm trying to configure MySQL: ArchWiki mysqld won't start. My /var/lib/mysql/stovepipebox.err: 120310 16:24:31 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql /usr/bin/mysqld: Table 'mysql.plugin' doesn't exist 120310 16:24

  • V210 won't output to Monitor

    Had to replace my old v210 with a new one. The new one did not come with a video card or DVD-ROM, so I took them out of the old server. The DVD-ROM works fine, but I either get no output on the monitor, or if I do, it looks like a sync'ing issue (hor

  • GGB0 Asset Master Validation of fields on different tabs, on SAVE button

    Hi, Experts. For the the validation step in GGB0,  I need to trigger the validation step when the SAVE button clicked in AS01. The point is, you have to trigger the validation step with ANY tab-screen in AS01 is ACTIVE ( General , Time-dependent, All

  • Mocha Corner Pin Data Changing Scale of Solid Layers (CS6)

    Hi, im new to the adobe forums (not after effects though) and im having some trouble with Mocha tracking corner pin data. I have been practicing this sub-surface skin effect from Iron Man 3 that Video Copilot made a tutorial on, but im having some pr

  • Distiller option - save PDF settingings in PDF

    In distiller under the advanced tab you can choose to "Save Adobe PDF settings inside PDF file" What exactly is this referring to? Where in a PDF do you look to see the information that has been included if this option is checked? Thanks, John