How to insert Mutiple data in a single column

I have an E_CTIC_DTA table with a clob column

I want to insert all the data from EMP in this clob column that too in a single line
When each series of records must be in a new line.

for example: 121 AH 5000 50 131 MACIEL 1000 10 141 KING 5000 50

The text file should look like below when we choose the CLOB

121 50 5000 SALOME
131 1000 10 MACIEL
141 KING 5000 50

Any reference links or suggestions please...

Thanks in advance...

Hello

A simple example:

DECLARE
    v_clob CLOB;
    v_line VARCHAR2(4000);
BEGIN
    FOR reg IN (SELECT *
                FROM   employees e)
    LOOP
        -- Loading new line (maybe using a procedure, etc).
        v_line := reg.employee_id || reg.first_name;

        -- Adding the line to the clob
        v_clob := v_clob || v_line || CHR(13);
    END LOOP;

    -- Inserting into the table
    INSERT INTO E_CTIC_DTA
    VALUES v_clob;

    COMMIT;
END;
/

Kind regards

Tags: Database

Similar Questions

  • How to insert multiple lines using a single query

    Hi all

    How to insert multiple lines using a single query to the emp table?
    I have the number of rows to insert into table x. consumes a lot of time. I tried to insert several lines using a single query, but get errors. I know exactly the query to do this.


    Thank you
    Sunil

    Like this?

    SQL> create table test(id number , dt date);
    
    Table created.
    
    SQL> insert into test values(&a,&b);
    Enter value for a: 1   --- It asked me and I entered 1
    Enter value for b: sysdate  --- It asked me and I entered sysdate
    old   1: insert into test values(&a,&b)
    new   1: insert into test values(1,sysdate)
    
    1 row created.
    
    SQL> 
    

    g.

  • How to insert CLOB data in tha table in my database

    I create a table called (annual NUMBER, name VARCHAR and CLOB doc) html page

    IsqlPlus I have run the following procedure


    P4_FIRE_HTML_TRIGGER_ARG EXEC ("OLBA + LEGAL + PSOA + OEJN", file);  file: came the CLOB parameter

    the result parameter is set to the queue:
    < ! DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 / / IN" "http://..." >
    < HTML >
    < HEAD >
    < TITLE > ADDS - METARS results form < / TITLE >
    "< LINK REL ="StyleSheet"type =" text/css"HREF="/layout/awc/mystyle.css ">
    < / HEAD >
    < BODY BGCOLOR = "#FFFFFF" >
    < TABLE SUMMARY = "this table is used for formatting only" BORDER = 0 CELLPADDING = 3 CELLSPACING = 0 >
    < TR VALIGN = "top" >
    < TD ALIGN = "left" COLSPAN = "2" >
    < H2 > Aviation digital data Service (ADDS) < / H2 >
    Produced by form of METAR (1858 & #160;) 11 February 2014 UTC) < BR >
    " located at < A HREF =" http://AV .............................
    < Table >
    < /TR >
    < TR VALIGN = "top" >
    < TD ALIGN = "left" COLSPAN = "2" >
    < FONT FACE = "Monospace, Courier" > OLBA 111800Z 01006KT 7000 FEW026 16/11 Q1022 < / POLICE > < BR >
    < FONT FACE = "Monospace, Courier" > LEGAL 111830Z 34005KT 8000 NSC 13/11 Q1021 NOSIG < / POLICE > < BR >
    < FONT FACE = "Monospace, Courier" > PSOA 111830Z 21009KT 9999 - RA BKN016 06/03 Q1003 NOSIG < / POLICE > < BR >
    < FONT FACE = "Monospace, Courier" > OEJN 111800Z 34004KT CAVOK 25/20 Q1012 NOSIG < / POLICE > < BR >
    < Table >
    < /TR >
    < /table >
    < / BODY >
    < / HTML >

    I try inserting the above result in my HtmlPage of the table by a simple insert:
    Values inserted INTO HTMLPAGE (annual, doc)
    (5, 'meatr_taf', ' <!) DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 / / IN" "http://... "
    ... < / HTML > ') values are not inserted just I got a message:
    SP2-0863: iSQL * more treatment

    Can someone help me to insert CLOB data in my table HtmlPage above
    Thank you

    software:

    Form [32 bit] Version 9.0.2.9.0 (Production), oracle JInitiator: Version

    1.3.1.9, WebUtil Version 1.0.2 (Beta), window xp service pack 2 build 2600, Internet Explorer 8

    LOOP
    UTL_HTTP. READ_LINE (RESP, File_Metar, TRUE);
    p2_putlines (File_Metar);
    USING_CLOB. ADD_MORE (1, File_Metar);
    USING_CLOB. LOB_INS (1, 'Metar_taf', File_Metar);
    END LOOP;
    UTL_HTTP. END_RESPONSE (resp);

    You should not use USING_CLOB. LOB_INS (1, 'Metar_taf', File_Metar) inside the Loop.You must use

    LOOP

    UTL_HTTP. READ_LINE (RESP, File_Metar, TRUE);

    p2_putlines (File_Metar);

    USING_CLOB. ADD_MORE (1, File_Metar);

    END LOOP;

  • How to declare the data type of a column in a select query?

    How can we give the data type of each column on the fly during the selection of rows in a query?

    the cast function converts one data type to another.

    The syntax of the cast function is:

    Cast ({expr |}) (subquery) | (MULTISET (subquery)} AS type_name)

    Select cast (22 August 2003 ' AS varchar2 (30))
    Double;

    Published by: b_ * August 12, 2011 10:08

  • How to recover the data type of a column in a table?

    Hello

    I want to retrieve the data type of a column in a table. At the moment I'm querying attribute 'OCI_ATTR_DATA_TYPE', but it is SQLT_CHR varchar2 and nvarchar2 data type columns. I need to make a distinction between these columns of two separate data types. Y at - it all API through which I could get the exact data type of a column, i.e. "nvarchar2?

    Thanks in advance.

    Hashim

    Hello

    It is not a very direct way to do it. What you can do is to call OCIDescribeAny on the table that you want to get information. You can then get the OCI_ATTR_CHARSET_FORM attribute for the column. If the value of the attribute that you get is SQLCS_IMPLICIT, that would mean its a varchar/char/varchar2 column regular. If you get SQLCS_NCHAR, this means that the column is NCHAR. You can get the example of it here:

    http://download.Oracle.com/docs/CD/B14117_01/AppDev.101/b10779/oci06des.htm#446491

    Just look for the section "Recovering for a Table column Datatypes".

    Thank you
    Sumit

  • How to insert the data from the table file?

    I need to know that how can I insert data into multiple columns by file. I can simply insert data into a table of columns, but could not find a way to put the data in the column all.

    My data in a file store
    ************************************************text.txt***************
    133, nanny, nagina, 14 mph, 45637, 9156729863

    **************************************************************my_data(table)**********
    try to insert into table below...

    Name, ID, last_name, add, PIN. Mob

    *********************************************

    Let me know if you need anything else... :))

    Hey nanny.

    In fact, in SQL Developer, you can open a connection to the target schema, right-click on the Tables node in the Navigator tree, select import the data, then use the data import wizard. It is extremely flexible. Looks like you have a file of comma-separated variables, so if you select Format: csv and import method: Insert it will probably work fine.

    To minimize the risk of errors during import, choose a limit value of preview so that the wizard can review the data type and the size of all columns in several lines of data as possible, and then examine the size/type of data for each column on the next page of the wizard and replace if necessary. For date columns, it is also important to choose the appropriate format mask.

    Hope this helps,
    Gary
    SQL development team

  • How to insert the date column for the new line of adf BC tester.

    Hello

    JDeveloper version 11.1.1.5.0

    I have a table with a DATE column. I'm trying to insert a new row in the table of the BC ADF tester. While providing a value for the DATE column, I am struck the below error:

    (oracle.jbo.domain.DataCreationException) Houston-25009: failed to create an object of type: oracle.jbo.domain.Date type: java.lang.String with value: 2011/12/06

    Please let me know what should be the format to specify the date when inserting input value using the tester of BC.

    Thank you
    Rouhaud

    Roudier,
    You can determine the format of date by yourself.
    in your entity object select the attribute, click on edit, go to the control indicators, the Format type, select Date Simple
    and in the format field, you can enter the format you need
    as YYYY/MM/DD

  • How to insert the date with timestamp in the table values

    Jin
    I have a table

    create the table abc1 (dob date);

    insert into abc1 values (to_date (sysdate, "HH24:MI:SS RRRR/MM/DD))

    but when I see in the database, it shows that the normal date without time stamp.

    Is it possible to insert in the back-end with time stamp.

    Thank you...

    Firstly, SYSDATE is a DATE already, no need to convert a DATE using the TO_DATE() function.

    The date ALWAYS was a component "hour", if it is displayed until your NLS settings. for example:

    SQL> CREATE TABLE ABC1(DOB DATE);
    
    Table created.
    
    SQL> ALTER SESSION SET NLS_DATE_FORMAT='MM/DD/YYYY';
    
    Session altered.
    
    SQL> INSERT INTO ABC1 VALUES(SYSDATE);
    
    1 row created.
    
    SQL> SELECT * FROM ABC1;
    
    DOB
    ----------
    02/04/2010
    
    SQL> ALTER SESSION SET NLS_DATE_FORMAT='MM/DD/YYYY HH24:MI:SS';
    
    Session altered.
    
    SQL> SELECT * FROM ABC1;
    
    DOB
    -------------------
    02/04/2010 12:54:57
    
    SQL> DROP TABLE ABC1;
    
    Table dropped.
    
  • How can insert us Date beetwee two date in two tables

    Hi friend

    I have two date picker control point and the selection list an item in a list. Select form a value SL, PL, CL
    1 - section A
    2 b.
    3 point C

    When I entered dates to the point was and point B and select 'SL' to point C and press the submit button.

    I have a table with two columns ABC

    DTE Date;
    Let Varchar2 (12);

    for example, section A - January 16, 2009
    Item B - January 25, 2009
    point C - SL

    value sholud be enter ABC table as:

    JANUARY 16, 2009 SL
    JANUARY 17, 2009 SL
    JANUARY 18, 2009 SL
    JANUARY 19, 2009 SL
    JANUARY 20, 2009 SL
    JANUARY 21, 2009 SL
    JANUARY 22, 2009 SL
    JANUARY 23, 2009 SL
    JANUARY 24, 2009 SL
    JANUARY 25, 2009 SL


    Thank you

    Jean-Yves

    You need a pl/sql process that might look like this:

    begin
    
    while :P1_DATEPICKER1 != :P1_DATEPICKER2
    loop
      insert into ABC (DTE, LEAVE)
      values (to_date(:P1_DATEPICKER1,'dd.mm.yyyy'), :P1_SELECTLIST);
    
      :P1_DATEPICKER1 := to_date(:P1_DATEPICKER1,'dd.mm.yyyy') + 1;
    end loop;
    commit;
    end;
    

    Best regards

    Tobias

  • How to insert custom data in a database in a form entry field, database mySql, linux-based...

    I have a pdf file that includes membership cards.

    I want to shoot the members names and some other information from a database and insert them into a personalized card for downloading and printing...

    XML or Javascript solution?

    -best

    Kevin

    Not possible in Acrobat/Reader.

    LiveCycle can connect to a SQL database.

  • inserting multiple data in a single textfield

    is this possible? something like "select name from table where department_id = 2" and put it in a textfield (or any favorite element) and the output would be like "sanchez, goodyear, hillman" <-given shud also be separated by comma.

    Looks like you want to combine the result set of a multirow query and display all elements in a single text element in a form. If this is correct, you can do this with a cursor to loop and concatenate each line containing the text element. Where to put the code depends on when you need to see. My guess would be a when-validate-Item trigger or after request, but it could also be a time - new - block - Instance - all depends on your needs. (B-)

    DECLARE
       CURSOR get_names IS
          /* Your SQL Statement Here */
          /* For some reason, the Forum Editor won't save my post */
          /* if I put your SQL statement here. Very wierd!! */
    BEGIN
       FOR rec IN get_names LOOP
          IF ( :MY_BLOCK.TEXT_ITEM IS NULL ) THEN
             :MY_BLOCK.TEXT_ITEM := rec.Name;
          ELSE
             :MY_BLOCK.TEXT_ITEM := :MY_BLOCK.TEXT_ITEM || ', ' || rec.Name;
          END IF;
       END LOOP;
    END;
    

    Hope this helps,
    Craig

    If a response is appropriate or useful, please mark accordingly.

    Published by: Silvere April 27, 2010 07:59

    Published by: Silvere April 27, 2010 08:01

  • How to display several numbers in a single column in same PO?

    How can I display multiple receipt of a single purchase order numbers in the same area?

    Check this box...

    Select pha.segment1 po_num

    , rtrim (xmlagg (xmlelement (e, rsh.receipt_num |))) ') .extract ('/ / text()'), ',') enames

    of rcv_shipment_headers rsh

    rcv_shipment_lines rsl

    po_headers_all pha

    where rsh.shipment_header_id = rsl.shipment_header_id

    and rsh.creation_date between (sysdate-20) and (sysdate)

    and rsl.po_header_id = pha.po_header_id

    Pha.segment1 group

  • How to insert unique random values in 2 columns?

    I have a table with 2 columns

    Create table code_for_code)
    first_code varchar2 (10) unique not null,.
    second_code varchar2 (10) not null unique);

    and I want to make PL/SQL code to Insert unique values at random in two columns , for example 20 record... How can I do something like that?
    DECLARE
       i   NUMBER := 0;
    BEGIN
       LOOP
          INSERT INTO code_for_code
             SELECT first_code, second_code
               FROM (SELECT DBMS_RANDOM.STRING ('U', 20) first_code,
                            DBMS_RANDOM.STRING ('U', 20) second_code
                       FROM DUAL) a
              WHERE NOT EXISTS (
                       SELECT 1
                         FROM code_for_code
                        WHERE first_code = a.first_code
                          AND second_code = a.second_code);
    
          i := i + 1;
          EXIT WHEN i >= 20;
       END LOOP;
    
       COMMIT;
    END;
    
  • How to insert a KPI by comparing two columns

    I want to compare the value of date under "Start" column and value under the column 'BL1 Start' date and if they are same I want to use an indicator in another area and if not even, then one other indicator should be displayed in the same field.
    Kindly let me know how to do it.

    Concerning

    It is true that you can not use all of the 2 parameters (defined by the user and P6 standard fields as well incidentally) on both sides of the operator 'is' in the section 'if' of global change as a condition.

    and since the use cases is there, personally I see no reason why this is impossible. If any-to-any field comparisons are allowed, any comparison without meaning of different data types should just return 0 as their value of truth (unfulfilled condition) or generate errors of global change report

    Otherwise, more elegant solutions could include more complex "sentences" used as conditions, with more than one driver

    for example if param_1< param_2="" -="">

    where param_n is a field any (standard or user-defined)
    also the choice of any parameter, but also the operators of drop-down lists should be limited depending on the data type of the or the previously selected parameters

    to answer your original question, the only solution I can think of is for you:

    * 1.* create a user-defined field: my_kpi

    * 2 use global_change_1 to calculate the value of my_kpi, based in any other number n standard, udf fields, and/or custom values, including PS, CD, current_date_time, substring(), etc to meet your needs.

    Use 'then' as many lines as needed. No line 'if' required.

    for example

    my_kpi = param_1 + param_2
    my_kpi = my_kpi * param_3
    my_kpi = my_kpi - some_other_udf
    my_kpi = my_kpi / {custom} division by 0 should be avoided as it will generate errors

    It's the equivalent of

    my_kpi = ((param_1 + param_2) * param_3 - some_other_udf) / {custom}

    you will probably need one ore two lines with simple divisions or added to calculate a relevant value for my_kpi.

    for example

    my_kpi = CD - planned finish
    my_kpi = my_kpi - {contingency}

    * 3.* create another udf: my_indicator

    * 4 use global_change_2 to assign values of color my_indicator

    If my_kpi< minumum="" threshold,="" then="" my_indicator="red," else="" my_indicator="">

    If you want a 3-color scale, you will need a more global change which will present the yellow flag.

    the major drawback of this is that P6 does not (not even v7) solutions (scheduled tasks), action-triggered or even conditional running of global change as defined.

    It would be nice to have lots of global change and have global_change_n triggered by the completion of the global_change_n-1, or even incorporate a global change (a reference to its definition) in the lines "then" or "else" to another planetary change.

    This could improve significantly (or completely screw up :) the business logic of P6

    concerning

    Published by: [email protected] on October 7, 2009 19:08

    Published by: [email protected] on October 7, 2009 19:12

  • How to group them by for a single column of OBIEE 11 g

    Hello

    I have a pivot table, where I dimensions such as Desc, date and columns 1 did. (OBIEE version 11117)

    I need the data to be included in the format, made wise date 2 months and total of the first made of the month

    January 1, 152 January 1531 January 15February 1, 152 February 1528 February 15
    up to the date ofIn total, Jan
    A36123456
    B917368163
    C918459153
    D1319586210

    When the Date parameter, Till Date = Jan 2nd, 15, (running report date parameter).

    I create the time dimension, where based there is if I take the year then it works but if I take months or a date, it does not work.

    [nQSError: 27037] Level pending: "D0 time." "" Time of H0. "" month_mon ". (HY000)

    Ask your Suggestions or help

    Total of jan can be derived as below

    case when 'D0 time. " "" date_day "BETWEEN TIMESTAMPADD (SQL_TSI_DAY, DAYOFMONTH (your_date}) *-(1) + 1, (your_date)) AND TIMESTAMPADD (SQL_TSI_DAY, TIMESTAMPADD (1), (SQL_TSI_MONTH, 1, TIMESTAMPADD (SQL_TSI_DAY, DAYOFMONTH (your_date) *-(1) + 1, (Your_date))) then 'Fact_value' end of another null)

Maybe you are looking for

  • Help! Need room for IQ804 AC adapter... Please, I beg you!

    Hello everyone, I just bought a TouchSmart IQ804 missing from its accessories... Can someone please get out of their adapter for my HP part number so I can order one (so I can't turn this thing on)... Thank you PS: don't want to be a bother, but... a

  • 'connect', 'wireless network', 'preferred '.

    Where can I find my "network security key?

  • Acer Aspire V3 772 G BIOS grayed out

    HelloI have a laptop Acer Aspire V3 (model G 772-9643), Acer sent me the recovery disks for. The first two steps they registered on the included sheet was to insert the disc labeled "System drive", then reboot and press F12 to get into the boot menu.

  • Options-&gt; Advanced Options-&gt; question of PTC

    Hi guys. I certify on the TCP parameters. You know that BB has options for TCP (Settings / Options-> Advanced Options-> TCP: "APN", "APN username" and "Password for APN"). Can I connect via HttpConnection without any configuration (without suffix: ";

  • BlackBerry Smartphones Will a BB Curve works on a South African network?

    I had like buying a curve or similar in the USA and take it with me in my country, South Africa I need to know if it will work on the networks, we have here, namely Vodacom I intend to use a Vodacom sim card and pay my subscription to this network, n