How to convert the column online

Hello

Do is samble of my data, I need to convert columns into rows

create table uload_table (id1 number, tidset varchar2(200));

Insert into UNLOAD_TABLE (ID1,TIDSET) values (1,1);
Insert into UNLOAD_TABLE (ID1,TIDSET) values (1,2);
Insert into UNLOAD_TABLE (ID1,TIDSET) values (1,3);
Insert into UNLOAD_TABLE (ID1,TIDSET) values (1,4);
Insert into UNLOAD_TABLE (ID1,TIDSET) values (1,5);
Insert into UNLOAD_TABLE (ID1,TIDSET) values (1,7);
Insert into UNLOAD_TABLE (ID1,TIDSET) values (1,8);
Insert into UNLOAD_TABLE (ID1,TIDSET) values (1,10);
Insert into UNLOAD_TABLE (ID1,TIDSET) values (2,2);
Insert into UNLOAD_TABLE (ID1,TIDSET) values (2,3);
Insert into UNLOAD_TABLE (ID1,TIDSET) values (2,4);
Insert into UNLOAD_TABLE (ID1,TIDSET) values (2,5);
Insert into UNLOAD_TABLE (ID1,TIDSET) values (2,8);
Insert into UNLOAD_TABLE (ID1,TIDSET) values (2,9);
Insert into UNLOAD_TABLE (ID1,TIDSET) values (2,10);
select * FROM UNLOAD_TABLE ;
ID1      TIDSET
----- ----------   
1     1
1     2
1     3
1     4
1     5
1     7
1     8
1     10
2     2
2     3
2     4
2     5
2     8
2     9
2     10
I need the result to be as below.
ID1      TIDSET
----- ----------   
1     ;1;2;3;4;5;7;8;10
2     ;2;3;4;5;8;9;10
any help please,.

http://download.Oracle.com/docs/CD/E11882_01/server.112/e26088/functions089.htm#SQLRF30030

Concerning

Etbin

Tags: Database

Similar Questions

  • How to convert the column of ROW using DBMS_REDIFINITION object type column

    Hi all
    Suppose I have the following table to convert:
    create table customer as select customer_id cid, cust_first_name name, cust_address street from customers;
    alter table customer modify cid primary key;
    I created the table based on the customers of the OE schema table, while the street column has cust_address_typ with the following attribute object type
    SQL> describe cust_address_typ
     Name                                     Null?     Type
     ----------------------------------------------------- -------- ------------------------------------
     STREET_ADDRESS                               VARCHAR2(40)
     POSTAL_CODE                                   VARCHAR2(10)
     CITY                                        VARCHAR2(30)
     STATE_PROVINCE                               VARCHAR2(10)
     COUNTRY_ID                                   CHAR(2)
    I want to convert the object attribute adresse_rue in a column of RDM. Consider the following temporary table:
    CREATE TABLE INT_CUSTOMER(
    CID NUMBER,
    NAME VARCHAR2(30),
    street varchar2(100)
    );
    First of all, I checked if the table can be redefined:
    --Verify if the table can be redefined
    BEGIN
    DBMS_REDEFINITION.CAN_REDEF_TABLE('OE','CUSTOMER',DBMS_REDEFINITION.CONS_USE_PK);
    END;
     4  /
    
    PL/SQL procedure successfully completed.
    But when I started the redefinition, I got an error:
    BEGIN
    DBMS_REDEFINITION.START_REDEF_TABLE(
    uname => 'OE',
    orig_table => 'CUSTOMER',
    int_table => 'INT_CUSTOMER',
    col_mapping => 'CID CID, NAME NAME, STREET CUST_ADDRESS_TYP(STREET_ADDRESS)'
    );
    END;
      9  /
    BEGIN
    *
    ERROR at line 1:
    ORA-00923: FROM keyword not found where expected
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 52
    ORA-06512: at "SYS.DBMS_REDEFINITION", line 1646
    ORA-06512: at line 2
    What seemed to be the problem?

    Best regards
    Val

    Published by: Valerie good-natured October 9, 2011 21:43

    Have you tried this one:

    BEGIN
    DBMS_REDEFINITION.START_REDEF_TABLE(
    uname => 'OE',
    orig_table => 'CUSTOMER',
    int_table => 'INT_CUSTOMER',
    col_mapping => 'CID CID, NAME NAME,"CUSTOMER".STREET.STREET_ADDRESS STREET'
    );
    END;
    

    Looking at your trace file, I claim that when you use the call above to START_REDEF_TABLE, the inner workings of this procedure will create this SQL statement:

    select CID CID, NAME NAME,"CUSTOMER".STREET.STREET_ADDRESS STREET from "OE"."CUSTOMER" "CUSTOMER"
    

    (You can prove or disprove my claim by tracing it ;-)))

    And this statement has had an alias - even if the alias is the same as the name of the table...

  • How to convert the column lines

    I need to convert my output lines of sql for the column as a pivot to 11g

    Please give me the example of this

    check out this link

    http://nimishgarg.blogspot.com/2010/06/Oracle-pivot-data-rows-to-columns.html

    request for 10g would be

    Select *.
    (select job,
    Sum (decode(DEPTNO,10,SAL)) dept10,
    Sum (decode(DEPTNO,20,SAL)) dept20,
    Sum (decode(DEPTNO,30,SAL)) dept30,
    Sum (decode(DEPTNO,40,SAL)) dept40
    from scott.emp
    Working Group)
    order by 1;

  • Convert the column online

    Table "tab1" has given below.

    column_acolumn_bcolumn_ccolumn_d
    1234

    Could you please help to provide the query data is displayed as below?

    column_e
    1
    2
    3
    4

    You can use the unpivot operator control, for example:

    with tab1 as

    (select 1 as column_a, column_b, 3 column_c 2, 4 as double column_d)

    Select column_e

    of tab1

    UNPIVOT

    (column_e FOR name (column_a, column_b, column_c, column_d))

  • convert the column to a string name

    pls help me.

    I need to know how can I convert the column to a string name because I can not insert the column name into my table.


    for matrix (SELECT nom_de_colonne
    OF all_col_comments@myDBLink
    WHERE UPPER (trim (table_name)) = "ROLEMATRIX")
    loop
    INSERT INTO myTABLE (myColumn)
    VALUES (matrix.column_name);
    end loop;


    my error:
    ORA-00984: column not allowed here

    which line you are confronted with error, because I've also tested this, his work on my side!

  • How to convert the precision extended float to float in C++

    Hello

    Could someone me please how to convert the extended precision (floatExt) float normal float in C++?

    What is the difference in the float between Labview and C++ data type?

    When I tried to receive a range of float of a function of the DLL generated by Labview in C++, data are bad.

    Thank you

    Victor King

    You can search for numeric data types in LabVIEW help for more information on the different types of data. Before sending the data to the C++ application, you can use the function of Double precision on digital / range of Conversion to convert number to Double precision.

  • How to convert the date in milliseconds?

    Hi all

    Can I know how to convert the date in milliseconds?

    My current datetime like this Formate

    QDateTime::currentDateTime (m:System.NET.SocketAddress.ToString ("MMMM dd, yyyy HH"))

    Seconds since January 1, 1970

    http://Qt-project.org/doc/Qt-4.8/QDateTime.html#toTime_t

    Sinds milliseconds January 1, 1970

    http://Qt-project.org/doc/Qt-4.8/QDateTime.html#toMSecsSinceEpoch

  • How to keep the columns of history in capital letters?

    Hello

    Is there a way to convert the columns that are marked as columns of history (ex: Created_By, Updated_By) uppercase and then store them in the database table? Once these columns are marked as history columns, Set accessor methods are not generated in the EOImpl class, and whenever a record is created or updated, the created_by and updated_by on these recordings are filled automatically by the framework using the name of securityContext so my interpretation is not bad.

    Is it possible to override this to ensure that whenever a transaction takes place, these columns are always inserted/updated on top of case?

    Thank you.

    You will need to return username converted to uppercase if the kind of story is HISTORY_CREATE_USER.

    So it should look like this:

    protected Object getHistoryContextForAttribute(AttributeDefImpl attributeDefImpl){
        if(attributeDefImpl.getHistoryKind()==AttributeDefImpl.HISTORY_CREATE_USER){
            return ADFContext.getCurrent().getSecurityContext().getUserName().toUpperCase();
        }else{
            return super.getHistoryContextForAttribute(attributeDefImpl);
        }
    }
    

    Dario

  • I don't see the event live from the URL indicated. How to join the event online please?

    I don't see the event live from the URL indicated. How to join the event online please?

    At the time you posted this question, the STM sessions had not started yet. The event started at 9:00 PT.  Please let me know if you are still experiencing difficulties to connect.

    Note: all sessions will be available for consultation on request after the event is finished at 1:00 pm PT.

    See you soon,.

    LKR

  • How to set the 1st online number = 10 and increment 10 whenever you press the button to add a new line. Also enable users to enter the generic numbers, IE 13 and still increment of 10 23 or whatever.

    How to set the 1st online number = 10 and increment 10 whenever you press the button to add a new line. Also enable users to enter the generic numbers, IE 13 and still increment of 10 23 or whatever.

    I already have my chart updated in place with a button that will add new lines when pressed.

    Now, I want to clarify that the 1st row is 10 and all the other rows after this increase by 10. It will also allow users to enter any number they want, and the next line will increment of 10.

    Help please.

    Try changing the line button Add the following JavaScript code

    newRow var = Table1._Row1.addInstance)

    If (newRow.index > 0)

    {

    newRow.NumericField1.rawValue = newRow.resolveNode ('Row1 [-1].) NumericField1') .rawValue + 10;

    }

    You need to change this code to match your name on the form, but basically the method addInstance() returns the new row, the newRow.resolveNode ("Row1 [-1]... will get the value of the previous row and then add 10.

    Concerning

    Bruce

  • Please how to convert the photo to the second

    2012-Kia-Rio-SX-side1.jpg11707850_10153403835594354_514303523436587694_n-1.jpg

    Please guys how to convert the kia rio pictures the second perfect like this, and with any program, I know that all steps in details please its very important

    That looks just like you would use the tool pen to redraw on the image and create shape layers (black areas). It could be done in Photoshop or Illustrator.

    Using Photoshop | Draw with the pen tools

  • How to disable the library online?

    How to disable the library online?

    Hello

    Please see the thread below:

    How to disable way permanent libraries CC

    Kind regards

    Sheena

  • Hello, I have a full desktop in Adobe Muse, site and I want to convert it into a version Tablet & phone, then, how would convert the site Office to Tablet & phone to copy the entire office content and site structure? Thanks for any help.

    Hello, I have a full desktop in Adobe Muse, site and I want to convert it into a version Tablet & phone, then, how would convert the site Office to Tablet & phone to copy the entire office content and site structure? Thanks for any help.

    You can not automatically convert. Click on the "tablet" or "Phone" at the top of your plan view to create these versions.

    You can then copy and paste on any content you want has more of your office.

  • How to list the columns for a view

    Dear experts

    I know how to list the columns in a table. This easy by querying the data USER_TAB_COLUMNS dictionary.

    But my problem is how to issue a query that returns the columns for a view?

    Thanks in advance

    USER_TAB_COLUMNS stores the metadata for both views.

    Select * from user_tab_columns where table_name = 'YOUR_VIEW_NAME"of order of column_id.    -Replace with your view_name (mandatory course)

    See you soon,.

    Manik.

  • How to check the column updated whereby the package or procedure?

    Hi all

    Can someone help me how to check the column updated by which the package or procedure

    A.Mahesh

    Hello.

    You can check what object is a reference to the table of the column:

    Select *.

    of all_dependencies d

    where d.REFERENCED_NAME = '. '

    And you can find all the links to the object source data column:

    Select *.

    of s all_source

    where s.name = "."

    and s.OWNER = '. '

    and s.TYPE = "."

    and as s.TEXT '%%'

Maybe you are looking for

  • What is WGASetup?

    Run responsible programs sometimes and other times not (see questions above). This would have no possible connection to issue?

  • Why my webscan on HP 6700 won't work with mac OSX Mavericks?

    I have a new mac mini, a new HP Officejet of 6700. Everything works on the officejet except the webscan, the only way I can scan is at the front of the printer and only in color which is a big problem. I downloaded the new version of the drivers that

  • Unlocked blackBerry storm Smartphones GSM connectivity problem

    Hello I have had verizon wireless storm and get it unlocked at the United States and he brought to the India. When I insert local service providers sim card, it keep changing GSM on board and does not support fully.when I try to make a call, it can s

  • Cannot install Windows 7 as one product key and not a CD

    Hi I have a dificultys on instalying windows 7 can u help me please I have buy windows, but no cd came machine product key number woot can I thank you so much.plz help

  • Hot sync for mac with Z22

    I performed a hotsync operation and by the PALM Z22, it was full and no error messages have been identified; However, my PALM Desktop on Mac is empty while the transfer moved not. Please note that all the data are on the PALM and not on the Mac deskt