Multiple row insertion into rm_text_lines from "free format select text"?

We use the Repository Object Navigator (RON) to define views through the "free format select text" ("Select text" and "Where/Validation condition" fields).
Before the upgrade/migration to 9i (repository and clients), multi-line definitions inserted in these text fields with older Designer clients were saved in multiple rm_text_lines rows and have remained this way after the upgrade/migration.
With the 9i Designer clients, the multi-line definition (separated by "Enter" key) are now inserted as only one row.
Is there any (easy) way in Designer 9i client to "force" the insertion of multiple rows into rm_text_lines when an "Enter" (chr(13)+chr(10)) is encountered?

Can you give a use case? Are you using some Repository API scripts that expect that rm_text_lines are no longer than a single line, that are now failing when the text is actually fairly long? Are you printing and want to make sure that line breaks occur where the user put them?
I ask because there really isn't a way to force Designer to break long text into multiple rm_text_line rows. Therefore, you are going to have to change your API scripts and reports to take the possible long lines into account.

Similar Messages

  • How can I use multiple row insert or update into DB in JSP?

    Hi all,
    pls help for my question.
    "How can I use multiple rows insert or update into DB in JSP?"
    I mean I will insert or update the multiple records like grid component. All the data I enter will go into the DB.
    With thanks,

    That isn't true. Different SQL databases have
    different capabilities and use different syntax, That's true - every database has its own quirks and extensions. No disagreement there. But they all follow ANSI SQL for CRUD operations. Since the OP said they wanted to do INSERTs and UPDATEs in batches, I assumed that ANSI SQL was sufficient.
    I'd argue that it's best to use ANSI SQL as much as possible, especially if you want your JDBC code to be portable between databases.
    and there are also a lot of different ways of talking to
    SQL databases that are possible in JSP, from using
    plain old java.sql.* in scriptlets to using the
    jstlsql taglib. I've done maintenance on both, and
    they are as different as night and day.Right, because you don't maintain JSP and Java classes the same way. No news there. Both java.sql and JSTL sql taglib are both based on SQL and JDBC. Same difference, except that one uses tags and the other doesn't. Both are Java JDBC code in the end.
    Well, sure. As long as you only want to update rows
    with the same value in column 2. I had the impression
    he wanted to update a whole table. If he only meant
    update all rows with the same value in a given column
    with the same value, that's trivial. All updates do
    that. But as far as I know there's know way to update
    more than one row where the values are different.I used this as an example to demonstrate that it's possible to UPDATE more than one row at a time. If I have 1,000 rows, and each one is a separate UPDATE statement that's unique from all the others, I guess I'd have to write 1,000 UPDATE statements. It's possible to have them all either succeed or fail as a single unit of work. I'm pointing out transaction, because they weren't coming up in the discussion.
    Unless you're using MySQL, for instance. I only have
    experience with MySQL and M$ SQL Server, so I don't
    know what PostgreSQL, Oracle, Sybase, DB2 and all the
    rest are capable of, but I know for sure that MySQL
    can insert multiple rows while SQL Server can't (or at
    least I've never seen the syntax for doing it if it
    does).Right, but this syntax seems to be specific to MySQL The moment you use it, you're locked into MySQL. There are other ways to accomplish the same thing with ANSI SQL.
    Don't assume that all SQL databases are the same.
    They're not, and it can really screw you up badly if
    you assume you can deploy a project you've developed
    with one database in an environment where you have to
    use a different one. Even different versions of the
    same database can have huge differences. I recommend
    you get a copy of the O'Reilly book, SQL in a
    Nutshell. It covers the most common DBMSes and does a
    good job of pointing out the differences.Yes, I understand that.
    It's funny that you're telling me not to assume that all SQL databases are the same. You're the one who's proposing that the OP use a MySQL-specific extension.
    I haven't looked at the MySQL docs to find out how the syntax you're suggesting works. What if one value set INSERT succeeds and the next one fails? Does MySQL roll back the successful INSERT? Is the unit of work under the JDBC driver's control with autoCommit?
    The OP is free to follow your suggestion. I'm pointing out that there are transactions for units of work and ANSI SQL ways to accomplish the same thing.

  • Multiple row insert not working as before after applying hotfix apsb13-13

    Coldfusion 9.01
    Windows Server 2003
    Microsoft Access database (yeah, we know)
    Before the hotfix was applied, we could add multiple rows (anywhere from 1-100 or more) and now we're limited to 15 rows at a time after applying the hotfix. We've narrowed it down to the hotfix being the culprit as we had to rebuild the server not to long after this hotfix was applied (~ 1 month) and the multiple row inserts were once again working fine until we got to the point of applying this hot fix again.
    Anyone heard of this happening? Any ideas how to correct?
    Thanks in advance,
    fmHelp
    Below is code  of how we're doing the multiple row insert (it's performed over 3 pages):
    Page 1
    <cfform name="form1" method="post" action="handler.cfm?page=update_2">
    <input type="hidden" name="sProductID" value="<cfoutput>#qProducts.sProductID#</cfoutput>">
    <table width="100%" border="0" cellspacing="3" cellpadding="3">
      <tr>
        <th scope="row" colspan="2" align="center">Update an Inventory Product</th>
      </tr>
      <tr>
        <th width="42%" scope="row">Product ID</th>
        <td width="58%"><cfoutput>#qProducts.sProductID#</cfoutput></td>
      </tr>
      <tr>
        <th width="42%" scope="row">Friendly Name</th>
        <td width="58%"><cfoutput>#qProducts.sFriendly_Name#</cfoutput></td>
      </tr>
      <tr>
        <th width="42%" scope="row">Description</th>
        <td width="58%"><cfoutput>#qProducts.sDescription#</cfoutput></td>
      </tr>
      <tr>
        <th width="42%" scope="row">Vendor</th>
        <td><select name="sVendor">
          <cfoutput><option value="#qProducts.sVendor#">#qProducts.sVendor#</option></cfoutput>
          <option value=""></option>
          <cfoutput query="qVendor">
            <option value="#sVendor#">#sVendor#</option>
          </cfoutput>
        </select></td>
      </tr>
      <tr>
        <th scope="row">Order No.</th>
        <td><cfinput name="sOrder_No" type="text" value="" required="yes" message="Order number is a required field."></td>
      </tr>
      <tr>
        <th scope="row">Lot No.</th>
        <td><input name="sLot" type="text" value=""/></td>
      </tr>
      <tr>
        <th scope="row">Date Expires</th>
        <td><input name="dtExpire" type="text" value=""/></td>
      </tr>
      <tr>
        <th scope="row">Boxes received</th>
        <td><input name="iBoxes" type="text" value="" /></td>
      </tr>
      <tr>
        <th scope="row">Doses/Units</th>
        <td><input name="pcount" type="text" value="" /></td>
      </tr>
      <tr>
        <th scope="row">Note</th>
        <td><cfoutput>#qProducts.sNote#</cfoutput></td>
      </tr>
      <tr>
        <th scope="row"> </th>
        <td> </td>
      </tr>
      <tr>
        <th scope="row" colspan="2" align="center"><input type="submit" value="Submit" /></th>
      </tr>
    </table>
    </cfform>
    </table>
    Page 2
    <form name="form1" method="post" action="handler.cfm?page=update_3">
    <cfoutput><input type="hidden" name="pcount" value="#FORM.pcount#"></cfoutput>
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
              <td colspan="6" align="left">Record count (Doses/Units)= <cfoutput>#FORM.pcount#</cfoutput></td>
        </tr>
        <tr>
            <td>Product ID</td>
            <td>Vendor</td>
            <td>Order No.</td>
            <td>Lot No.</td>
            <td>Expiration Date</td>
            <td>Num. of Boxes</td>
        </tr>
        <cfset Peoplecount = 0>
        <cfloop index="Add" from="1" to="#form.pcount#" step="1">
            <tr>
                <cfset Peoplecount = PeopleCount + 1>
                <td><input  <cfoutput> value="#FORM.sProductID#" </cfoutput> name="sProductID_<cfoutput>#Peoplecount#</cfoutput>" type="text" id="sProductID_"></td>
                <td><input <cfoutput>value="#FORM.sVendor#"</cfoutput> name="sVendor_<cfoutput>#Peoplecount#</cfoutput>" type="text" id="sVendor_"></td>
                <td><input  <cfoutput> value="#FORM.sOrder_No#" </cfoutput> name="sOrder_No_<cfoutput>#Peoplecount#</cfoutput>" type="text" id="sOrder_No_"></td>
                <td><input <cfoutput>value="#FORM.sLot#"</cfoutput> name="sLot_<cfoutput>#Peoplecount#</cfoutput>" type="text" id="sLot_"></td>
                <td><input  <cfoutput> value="#DateFormat(FORM.dtExpire, 'MM/DD/YY')#" </cfoutput> name="dtExpire_<cfoutput>#Peoplecount#</cfoutput>" type="text" id="dtExpire_"></td>
                <td><input <cfoutput>value="#FORM.iBoxes#"</cfoutput> name="iBoxes_<cfoutput>#Peoplecount#</cfoutput>" type="text" id="iBoxes_"></td>
            </tr>
        </cfloop>
        <tr>
            <td> </td>
            <td>
                <input type="submit" name="Submit" value="Submit">
                <input name="HowMany" type="hidden" id="HowMany" value="<cfoutput>#Form.pcount#</cfoutput>">
            </td>
        </tr>
    </table>
    </form>
    </table>
    Page 3
    <cfquery name="qGetOnHand" datasource="#variables.DSNCI#">
    SELECT        *
    FROM        Products
    WHERE        sProductID = '#session.sProductID#'
    </cfquery>
    <cfquery datasource="#variables.DSNCI#">
    UPDATE        Products
    SET            iOnHandQty = (#FORM.pcount# + #qGetOnHand.iOnHandQty#)
    WHERE        sProductID = '#session.sProductID#'
    </cfquery>           
    <cfset quantity = #FORM.pcount#>
    <cfset Pcount = 0>
    <!-- Start Loop -->
    <cfloop index="Add" from="1" to="#form.howmany#" step="1">
        <cfset Pcount = Pcount + 1>
        <cfset Product = "Form.sProductID_#Pcount#">
        <cfset Product = Evaluate(Product)>
        <cfset Vendor = "Form.sVendor_#Pcount#">
        <cfset Vendor = Evaluate(Vendor)>
        <cfset Order  = "Form.sOrder_No_#Pcount#">
        <cfset Order = Evaluate(Order)>
        <cfset Lot = "Form.sLot_#Pcount#">
        <cfset Lot = Evaluate(Lot)>
        <cfset Expires = "Form.dtExpire_#Pcount#">
        <cfset Expires = Evaluate(Expires)>
        <cfset Boxes = "Form.iBoxes_#Pcount#">
        <cfset Boxes = Evaluate(Boxes)>
        <cfquery datasource="#variables.DSNCI#" name="InsertData">
            Insert into Received_History (sProductID, sVendor, sOrder_No, sLot, dtExpire, iBoxes, dtReceived)
            values ('#Product#', '#Vendor#', '#Order#', '#Lot#', <cfif Expires IS "">NULL<cfelse>#CreateOdbcDate(Expires)#</cfif>, #Boxes#, #CreateOdbcDate(Now())#)
        </cfquery>
    </cfloop>

    Rasi wrote:show your complete default.pa (also make sure that you dont override pulse settings in ~/.config/pulse) this setting should allow sound for ANY user - i just tried it and it works
    also: of course you restarted pulseaudio?
    I restarted pulseaudio and my computer.
    My default.pa is displayed in the first post.
    My files in /etc/pulse:
    > ls -la /etc/pulse
    total 28
    drwxr-xr-x 1 root root 116 May 16 10:22 .
    drwxr-xr-x 1 root root 3740 May 16 10:47 ..
    -rw-r--r-- 1 root root 1269 Mar 3 21:31 client.conf
    -rw-r--r-- 1 root root 2348 Oct 8 2013 daemon.conf
    -rw-r--r-- 1 root root 5756 May 16 10:24 default.pa
    -rw-r--r-- 1 root root 5718 Oct 8 2013 default.pa.pacnew
    -rw-r--r-- 1 root root 2112 Oct 8 2013 system.pa
    -la
    My files in ~/.config/pulse:
    > ls -la ~/.config/pulse
    total 1048
    drwx------ 1 homeuser homeuser 660 Sep 12 2013 .
    drwx------ 1 homeuser homeuser 1054 Apr 24 14:06 ..
    -rw-r--r-- 1 homeuser homeuser 40960 Oct 17 2013 1a8726d55f9140ae9d95dc512eacea67-card-database.tdb
    -rw-r--r-- 1 homeuser homeuser 43 May 16 10:37 1a8726d55f9140ae9d95dc512eacea67-default-sink
    -rw-r--r-- 1 homeuser homeuser 42 May 16 10:37 1a8726d55f9140ae9d95dc512eacea67-default-source
    -rw-r--r-- 1 homeuser homeuser 12288 May 16 10:49 1a8726d55f9140ae9d95dc512eacea67-device-volumes.tdb
    lrwxrwxrwx 1 homeuser homeuser 23 Sep 12 2013 1a8726d55f9140ae9d95dc512eacea67-runtime -> /tmp/pulse-cDmMRoO9oFBz
    -rw-r--r-- 1 homeuser homeuser 12288 May 15 22:43 1a8726d55f9140ae9d95dc512eacea67-stream-volumes.tdb
    -rw------- 1 homeuser homeuser 256 Jun 15 2013 cookie
    -rw-r--r-- 1 homeuser homeuser 331776 Jun 21 2013 equalizer-presets.tdb
    -rw-r--r-- 1 homeuser homeuser 659456 Sep 20 2013 equalizer-state.tdb
    Thanks for your efforts.

  • SQLite Multiple rows insert

    Hi,
    I know this question has been asked and there was an answer:
    http://stackoverflow.com/questions/1609637/is-it-possible-to-insert-multiple-rows-at-a-tim e-in-an-sqlite-database
    But now things has changed, from version 3.7.11 SQLite does work normally with multiple insert:
    http://stackoverflow.com/questions/1609637/is-it-possible-to-insert-multiple-rows-at-a-tim e-in-an-sqlite-database
    http://www.sqlite.org/lang_insert.html
    Now the problem is that I use SQLite Expert to perform a multiple row insert with normal sql method:
    INSERT INTO table (col1, col2) VALUES
          ('row1col1', 'row1col2'), ('row2col1', 'row2col2'), ...
    And this works. However when I try to use this insert within Flash Builder it gives me an error - syntax error near ",".
    Is there a way I can check or update SQLite within Flex so I could use multiple row insert?
    Thanks in advance for answers:)

    Unlike in php (values(product1),(product2),(product3))
    you cannot insert records like that in a sqlite db.
    What i did is the following
    public function insertMonthRecords():void
    var sqlText:String = &quot;INSERT INTO month( monthname)
    &quot; +
    &quot;VALUES('Januari')&quot;;
    insertStatement = new SQLStatement();
    insertStatement.sqlConnection = conn;
    insertStatement.addEventListener(SQLEvent.RESULT,
    insertResult);
    insertStatement.addEventListener(SQLErrorEvent.ERROR,
    errorHandler);
    insertStatement.text = sqlText;
    insertStatement.execute();
    insertStatement.text = &quot;INSERT INTO month(monthname)
    VALUES('Februari')&quot;;
    insertStatement.execute();
    insertStatement.text = &quot;INSERT INTO month(monthname)
    VALUES('March')&quot;;
    insertStatement.execute();
    insertStatement.text = &quot;INSERT INTO month(monthname)
    VALUES('April')&quot;;
    insertStatement.execute();
    And so on.. To bad i didn't found a solution to execute all
    the inserts at once. Inserting this way takes time :-(
    If you have a better solution, just let me know.
    Greetz, Jacob

  • Concatenate multiple row values into single column value

    Hello,
    Can anyone please refresh my memory on how to concatenate multiple row values into a single column value.
    In the following query, I will get multiple denial reasons per application and I would rather return all denial reasons on one line.
    SELECT a.application_id, a.membership_number,
    r.reason_text AS denial_reason,
    a.appl_receipt_date AS application_receipt_date,
    a.plan_request_1 AS application_plan_code,
    a.adjudication_date AS application_denial_date
    FROM application a, PLAN p, application_reason ar, reason r
    WHERE a.plan_request_1 = p.plan_cd
    AND a.application_id = ar.application_id
    AND ar.reason_id = r.reason_id
    AND a.adjudication_cd = 'D'
    AND a.appl_receipt_date BETWEEN '01-jan-2006' AND '31-dec-2006'
    AND p.plan_type_id = 12 and a.application_id = :appId
    ORDER BY application_id
    Any help is greatly appreciated.
    Thanks,
    -Christine

    found the following
    SELECT deptno,
           LTRIM(MAX(SYS_CONNECT_BY_PATH(ename,','))
           KEEP (DENSE_RANK LAST ORDER BY curr),',') AS employees
    FROM   (SELECT deptno,
                   ename,
                   ROW_NUMBER() OVER (PARTITION BY deptno ORDER BY ename) AS curr,
                   ROW_NUMBER() OVER (PARTITION BY deptno ORDER BY ename) -1 AS prev
            FROM   emp)
    GROUP BY deptno
    CONNECT BY prev = PRIOR curr AND deptno = PRIOR deptno
    START WITH curr = 1;
        DEPTNO EMPLOYEES
            10 CLARK,KING,MILLER
            20 ADAMS,FORD,JONES,SCOTT,SMITH
            30 ALLEN,BLAKE,JAMES,MARTIN,TURNER,WARD
    3 rows selected.at http://www.oracle-base.com/articles/10g/StringAggregationTechniques.php

  • Multiple rows insert and update form example

    I just want to share with you an example of a multiple rows insert and update form. You can access it HERE (http://tryapexnow.com/apex/f?p=12090:21)
    You will find on the same page the complete description of all elements used to buid it.
    I'm waiting for opinions, suggestions, and questions here in this thread.
    Thanks

    Hello Valentin,
    I got an error message when I clicked on the weblink. Here is the message
    Error ERR-7620 Could not determine workspace for application. Could you please take a look at this.
    Thanks,
    Karol

  • Multiple rows insertion - need help

    Hello all,
    I need to insert multiple rows in a table with a single query and the number of rows is 269470.
    There are 3 columns in the table. One of the columns is determined by another sub query which returns multilple(269470) rows and the other 2 columns remain same for all.
    I came up with the following query but need a loop to make it run multiple time(269470 times).
    insert into EMLUSRRECV
    (user_id, storeent_id, receiveml)
    values
    ((select user_id from users where user_id not in (select distinct user_id from EMLUSRRECV) and CURR = 'USD' and rownum = 1), 11154, 1);
    Thanks in advance.
    Edited by: 924585 on Feb 20, 2013 7:19 PM

    924585 wrote:
    Hello all,
    I need to insert multiple rows in a table with a single query and the number of rows is 269470.
    There are 3 columns in the table. One of the columns is determined by another sub query which returns multilple(269470) rows and the other 2 columns remain same for all.
    I came up with the following query but need a loop to make it run multiple time(269470 times).
    insert into EMLUSRRECV
    (user_id, storeent_id, receiveml)
    values
    ((select user_id from users where user_id not in (select distinct user_id from EMLUSRRECV) and CURR = 'USD' and rownum = 1), 11154, 1);
    Thanks in advance.
    Edited by: 924585 on Feb 20, 2013 7:19 PMwhy not just:
    insert into emlusrrecv
    select user_id, 11154, 1
      from  users
    where user_id not in (select user_id from EMLUSRRECV)
    and CURR = 'USD' and rownum = 1)

  • Multiple rows to be returned from a procedure without a cursor?

    We can return multiple rows using ref cursor as the return type in a procedure/function but I want to avoid processing a cursor. I would like to use the select statement on the returned multiple rows. I believe pl/sql table can not be used here also as select are not permitted on it. Is there some way to get around this defficiency in oracle?? Please help out!! My email is [email protected]
    null

    Oracle 8i has temporary tables. As far as I know, this is your only option.
    I, too, would like to be able to return a true "relation" (or "table") from a pl/sql function. Why can't I just specify the return type of the function as a "table" of "records"?
    Note that if pl/sql is completely orthogonality (neat word, huh?) I should be allowed to use this function that returns a "relation" as a table in the "from" clause of a sql query.
    Speaking of complete orthogonality, why can't I treat a pl/sql table just like any other table -- I should be able to query it, "insert" into it, "update" it, join it to other "tables", etc.
    How about this for a slogan, "tables everywhere"? Anything, from arrays scalars to functions to arrays of classes to pl/sql tables should be able to participate in a sql statement as a "relation/table."
    Anyone from Oracle listening out there? :-)

  • Multiple row insert "How To".

    I need a "How To" to add multiple rows to a table based on various input values.
    On my page I have the following:
    In the report section:
    select htmldb_item.hidden(1,null) circuit_id,
    htmldb_item.text(2,null) datacomm_id,
    htmldb_item.text(3,null) lan_equip_id,
    htmldb_item.text(4,null) circuit,
    htmldb_item.text(6,null) segment,
    htmldb_item.text(7,null) subnet,
    htmldb_item.text(8,null) lan_equip_model_id,
    htmldb_item.text(12,null) jack,
    htmldb_item.text(13,null) jpairs,
    htmldb_item.text(14,null) risers,
    htmldb_item.text(15,null) building,
    htmldb_item.text(16,null) uplink_lan_equip,
    htmldb_item.text(17,null) uplink_group,
    htmldb_item.text(21,null) comments,
    htmldb_item.text(22,null) vlan
    from neteng_circuits
    In the page processing processes section:
    -- insert circuits
    for i in 1..htmldb_application.g_f01.count
    loop
    insert into neteng_circuits
    (datacomm_id,
    lan_equip_id,
    circuit,
    topology,
    segment,
    subnet,
    lan_equip_model_id,
    lan_equip_ip,
    group1,
    port,
    jack,
    jpairs,
    risers,
    building,
    uplink_lan_equip,
    uplink_group,
    uplink_port,
    initials,
    date_modified,
    comments,
    vlan)
    values
    (htmldb_application.g_f02(i),
    htmldb_application.g_f03(i),
    htmldb_application.g_f04(i),
    :P41_TOPOLOGY,
    htmldb_application.g_f06(i),
    htmldb_application.g_f07(i),
    htmldb_application.g_f08(i),
    :P41_LAN_EQUIP_IP,
    :P41_GROUP1,
    :P41_PORT,
    htmldb_application.g_f12(i),
    htmldb_application.g_f13(i),
    htmldb_application.g_f14(i),
    htmldb_application.g_f15(i),
    htmldb_application.g_f16(i),
    htmldb_application.g_f17(i),
    :P41_UPLINK_PORT,
    :P41_INITIALS,
    :P41_DATE_MODIFIED,
    htmldb_application.g_f21(i),
    htmldb_application.g_f22(i));
    end loop;
    In the items section (with appropriate setup):
    5: P41_TOPOLOGY Select List
    9: P41_LAN_EQUIP_IP Text Field
    10: P41_GROUP1 Text Field
    11: P41_PORT Text Field
    18: P41_UPLINK_PORT Text Field
    19: P41_INITIALS Select List
    20: P41_DATE_MODIFIED Date Picker (DD-MON-RR)
    Ultimately the only fields which differ for the 48 new circuits
    which I wish to insert are:
    circuit_id (based on a trigger), jack, jpair (based on a select list),
    and port (values are 1-48, could be 1-16 under some circumstances).
    The uplink fields depend on the uplink_port value and there are similar
    relationships for other fields - I need to get them using select statements
    dynamically behind the scenes.
    Please help me to create this scenario.
    Thank you for all your help. Trudy.

    Does she want to insert 48 rows from the multi-row add delete check box report? If I understand that part correctly, then she needs to create an add button that adds another empty row into the table. Then she needs to populate the row with data; she would have to do this 48 times. From a form or a report I doubt that there is any other way to do it. When you do the update, the database gets updated by your sql insert statement that is in the update process you create. The update gets an event notification by an update button that you have created by clicking the Create a button displayed among the region's items when you created the button. The view also gets rendered with the same sql code. Refer to the example in the links that I gave you;
    your other question seems to revolve around sql.
    add the condition where x > =1 and y <= 48 into your sql conditions with an
    if condition. there are plenty of references for sql through a search on google;
    Let me know how things go.
    I have gotten my update to work with the workaround. The delete works with the following code:
    for i in 1..htmldb_application.g_f01.count
    loop
    delete from patient_info where primary_key_Column = htmldb_application.g_f02(htmldb_application.g_f01(i));
    end loop;
    I also have the sample add and insert(update) working. but I need to get the add the row dynamically to work in my real world data.
    Veena

  • 10GR2 - How can I load multiple row values into one field?

    Hi
    Can anyone please help with a problem I'm having with merging data.
    The source table has multiple entries for the same Id e,g,
    ID Code
    1 123
    1 234
    2 123
    2 567
    The output should only have one row per ID e.g.
    ID Code_List
    1 123;234
    2 123;567
    Do you know what operator I could use that would allow me to do this? I've looked at unpivot but I think I would need multiple output fields (one for each Code). I have to concatinate the codes and separate with a semi-colon.
    Thanks
    GB

    Q) Input data
    =============
    COL_0,COL_4
    1235,"G0123,G124,G25,G6"
    1236,"G01,G23,G124,G25,G6"
    1237,"G0123,G1,G24,G25,G6"
    1238,"G,G0123,G124,G25,G6"
    1239,"G0123124,G256"
    Output
    ======
    TEST_ID,TEST_VAL
    1235,G0123
    1235,G124
    1235,G25
    1235,G6
    1236,G01
    1236,G23
    1236,G124
    1236,G25
    1236,G6
    1237,G0123
    1237,G1
    1237,G24
    1237,G25
    1237,G6
    1238,G
    1238,G0123
    1238,G124
    1238,G25
    1238,G6
    1239,G0123124
    1239,G256
    I wrote this procedure...
    declare
    rcd_cnt number;
    test_id123 number;
    junk_1 number;
    cd_occurences number;
    child_count number;
    str_abc varchar2(200);
    char_pos     number default 0;
    cd_temp_str varchar2(50);--:= 'G0123,G124,G25,G6';
    begin
    select nvl(count(col_4),0) into rcd_cnt from test_ee where col_4 is not null;
    for aa in 1 .. rcd_cnt loop
    select col_0,rownum rn,nvl(trim(col_4),0) into test_id123,junk_1,cd_temp_str from (select col_0,rownum rn,col_4 from test_ee where col_4 is not null) where rn = aa;
    --dbms_output.put_line('...I am in for loop...' || cd_temp_str);
         --dbms_output.put_line('===================' || rcd_cnt || '.................' ||aa);
    cd_occurences := length(cd_temp_str) - length(replace(cd_temp_str,','));
    dbms_output.put_line(cd_temp_str || '...Str Occurences are ...'||cd_occurences ||'**************'||test_id123);
    child_count :=0;
    for z in 1..length(cd_temp_str)+1 loop
    child_count := child_count+1;
         if(instr(cd_temp_str,',') > 0) then
         char_pos := instr(cd_temp_str,',',1,1);
              str_abc := substr(cd_temp_str,1,char_pos-1);
         dbms_output.put_line('..Partial String of..'|| z ||'..is.....' || str_abc);
              insert into test_xx(test_id,test_val) values(test_id123,str_abc);
         end if;
         cd_temp_str := substr(cd_temp_str,char_pos+1,length(cd_temp_str));
         if(cd_occurences=child_count) then
         dbms_output.put_line('..Partial String of..is.....' || cd_temp_str);
              insert into test_xx(test_id,test_val) values(test_id123,cd_temp_str);
         end if;     
    end loop; -- close for of z */
    --dbms_output.put_line('...I am in end for loop...');
         end loop; -- close for of aa
    end;
    instead of procedure,is there any way from sqlqery.

  • PHP Multiple Row Insert

    I've created a Database schema that will allow the admin to
    easily update thier form. To do this I am using the data from the
    DB to dynamically create the form. For example, if the admin wants
    to add a new input to the form, they can do that by giving it a
    name and a type, such as text or radio.
    I've written code that displays the form based on the data.
    I'm stuck on getting the results from the form inserted back to the
    DB. Hopefully I can explain this well enough without having to post
    all the details.
    I have one table that is the responses from the form. Each
    row contains 5 columns that represent the request, the question,
    the option chosen, any details from the option chosen (text from a
    text field) and a customer id.
    I need to do an insert that will create a new row for the
    user's response to each question. I'm having some difficulty
    creating this mutiple row insert. Here is what I have so far, I'm
    using a mix of a DW insert with my own code. I'm hoping it's just a
    syntax issue...but it could be more. Thanks in advance.

    I didn't really explain the result. Nothing is inserted into
    the DB and everything that appeared on the page before adding the
    insert now no longer appears.

  • Insert into MSSQL from Oracle

    Hello together,
    I'm a little bit frustrated. The follwoing is my problem:
    I want to insert some values from an Oracle 10gR2 database into a MSSQL database (SQL Server 2008 R2).
    Therefor I'm using DG4ODBC 11.2.0.3. The connection is working absolutly fine.
    I want to insert five values from five columns from oracle.table-a into a msssql table-b.
    But I'm hitting the error:
    Invalid character value for cast specification.
    Two columns from the oracle table are chars size 12 and 40, and three are number size 5.1, 5.1 and 4.
    The MSSQL column definitions are varchar40, varchar50, 2x float8 and int.
    The column assignments are:
    Oralce -> MSSQL
    a. char 12 -> varchar40
    b. char 40 -> varchar50
    c. number 5.1 -> float8
    d. number 5.1 -> float8
    e. number 4 -> int4
    The insert works greate for a,b and e but nor for c and d.
    I tried so many solutions (cast, to_binary_float, nls_character_format, nls_theritpory etc..) but nothing helps.
    I always hitting this error.
    Can anyone help me with this problem?
    cheers
    Joe

    Hi together,
    I fixed the problem. I multiply the origin number with 10. The result is a number without any comma. During the insert into MSSql I divide by 10.
    I now, this is a very strange solution but it works.
    Yes I know this helps only, because the column can only save number with one decimal place. For higher decimal places you have to multiple it with 100 or 1000 or......
    Hope this helps also other peoples.
    kind regards
    Joe

  • SSIS - Script Task creates a DTS var and using Foreach loop, Execute SQL needs to INSERT into table from this DTS var.

    I have a script task written in C# that creates an array of strings "arrayFields" after parsing a text file. It saves the array of strings in a DTS variable.
    Each row in array represents a row is comma separated and is a row that must be inserted into a table. For example,
    X and Z are fields in the table
    X1, X2,....Xn
    Z1,Z2,...Zn
    I am using a Foreach Loop  to grab each row and then  Execute SQL Task to take each row from the array and insert each field per row in a table,
    The SQL is something like,
    INSERT dbo.table values(field1, field2,...fieldn) arrayFields?
    What should this this INSERT look like?

    I guess you implemented
    Shredding a Recordset
    Based on what I understood (correct me if I am wrong) you have difficulties mapping the input parameters, if so here is the guide
    http://www.sqlis.com/sqlis/post/The-Execute-SQL-Task.aspx
    In short it might look like
    INSERT dbo.table  (ColumnA, ColumnB,...) VALUES (?,?...)
    The syntax for the T-SQL INSERT is http://technet.microsoft.com/en-us/library/dd776381%28v=sql.105%29.aspx
    Arthur
    MyBlog
    Twitter

  • Multiple row insertion

    Hello Team....
    i have two view one is read only view & other is updatable view.....i want to take the data(Multiple row) from read only view & want to insert in to updatable view.
    How can i do this....?

    Hi Charu,
    Try this:
    1- in the property of the Read only table ( represent read only view ) make this
    - Row Selection -----------> Multiple
    - In Behivior clear SelectionListener
    - In Advanced clear SelectedRowKeys
    - In Advanced Binding make a bind to the table in backing bean
    In Backing Bean:
    RowKeySet rowSet1 = getYourTable().getSelectedRowKeys();
    Iterator rowSetIter = rowSet1.iterator();
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding voIter =
    (DCIteratorBinding)bindings.get("ReadOnlyViewObjectIterator");
    while (rowSetIter.hasNext()) {
    List l = (List)rowSetIter.next();
    Key key = (Key)l.get(0);
    voIter.setCurrentRowWithKey(key.toStringFormat(true));
    Row r = voIter.getCurrentRow();
    ApplicationModule am=voIter.getViewObject().getApplicationModule();
    ViewObject vo = am.findViewObject("UpdatableViewObject");
    Row vr=vo.createRow();
    vr.setAttribute("attributeName1",r.getAttribute("attributeName1");
    vr.setAttribute("attributeName2",r.getAttribute("attributeName2");
    vr.setAttribute("attributeName3",r.getAttribute("attributeName3");
    vo.insertRow(vr);
    I hope this work
    Sameh Nassar

  • Apex - Multiple Row Insert

    Hi Experts,
    I have created a application called shop floor @ http://apex.oracle.com/pls/apex/f?p=4550:1:0::::F4550_P1_COMPANY:SHOPFLOOR.
    Work sapce : shopfloor
    username :: [email protected]
    pass : apex123
    Application url : http://apex.oracle.com/pls/apex/f?p=74245:LOGIN_DESKTOP:17263636802909
    username : [email protected]
    passowrd : apex123
    I have create a trigger to capture username and insert date into the username and inser date field.
    This is the functionality I want on this form.
    When I click submit
    1) it should insert all the 8 rows into the database table .
    2)After submit, old rows should be gone from form and new 8 rows to be created in the form with 8 fixed values in the field names and target, actual, username and inserdate , comments should be blank so that new informatiion can be inout by users on next day.
    Please guide me how to achive this.
    Appreciate ur help
    Thanks
    Venkat
    The thing is

    You should donwnload one of the sample applications here and install it in your workspace. There you can see how these things are done. That is realy basic.
    http://www.oracle.com/technetwork/developer-tools/apex/application-express/packaged-apps-090453.html
    Sample Master Detail or
    Sample Tabular Form
    Usually, the triggers are taking care of inserting the audit information (creation date and user, change date and user).
    Denes Kubicek
    http://deneskubicek.blogspot.com/
    http://www.apress.com/9781430235125
    http://apex.oracle.com/pls/apex/f?p=31517:1
    http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
    -------------------------------------------------------------------

Maybe you are looking for

  • View and Instead of trigger

    Hi ! In my application I have two tables tabA(col_A1,col_A2,col_A3) and tabB(col_B1,col_B2)I created a view CREATE OR REPLACE VIEW  vt AS SELECT  col_A1, col_A2, col_A3, col_B1, col_B2      FROM  tabA  A              LEFT OUTER JOIN  tabB  B         

  • How do I create the D:/ drive?

    Somehow, I contrived to delete my D:/ drive while trying to figure out how to get my laptop to read a CD.  Can anyone tell me how to restore the drive?  I have a Toshiba Satellite with Win XP.

  • Change time from number format(ie. 3.50 hours) to regular time format( ie.3:30)

    How do you Change time from number format(ie. 3.50 hours) to regular time format( ie.3:30)

  • Use of ValueType characteristic in BCS - redundant?

    At a former client they had "ValueType" (from R/3) characteristic in the BCS DataBasis. It seems redundant to me when version allows differentiation between actual and plan. I didn't have time to investigate the mapping from R/3 before moving on to a

  • Current budget value is missing

    Dear Colleagues, please advise what could be the reason for the following problem. Transaction CJ31 (display original budget) shows no value for the field 'current budget' for the current fiscal year, but Project Cost Line Items (CJI4) shows, that th