Insert rows from l_qte_rec in to tmp table

xxx_pre_update_userbook(p_service_request_id number, p_sr_type_id number, p_status_id number,
                         p_resolution_code varchar2, p_bill_to_customer_id number,
                    p_bill_to_cust_account_id number, p_bill_to_customer_site_id number,
                    p_contract_id number, p_contract_line_id number,
                    p_resolution_summary varchar2,
                         x_status out varchar2, x_mesg out varchar2) as
          l_proj_incident_type_id number;
          l_isr_incident_type_id number;
          l_tac_incident_type_id number;
          l_status varchar2(10) := 'S';
          l_sr_closing_flag number;
          l_mesg varchar2(3000) := null;
          err_mesg varchar2(3000) := null;
          L_SO_ID NUMBER;
          L_LINK_REC CS_INCIDENTLINKS_PUB.CS_INCIDENT_LINK_REC_TYPE;
          L_OBJECT_VERSION_NUMBER NUMBER;
          L_RECIPROCAL_LINK_ID NUMBER;
          L_LINK_ID NUMBER;
     l_QTE_REC ASO_QUOTE_PUB.qte_header_rec_type;          
     l_control_REC ASO_ORDER_INT.control_rec_type;          
          l_Order_Header_Rec ASO_ORDER_INT.Order_Header_Rec_Type;
          l_Order_Line_Tbl ASO_ORDER_INT.Order_Line_Tbl_type;
          l_Return_Status VARCHAR2(30);
          l_Msg_Count NUMBER;
          l_Msg_Data VARCHAR2(3000);
          l_Msg_INDEX_OUT NUMBER;
          l_OUT_MESSAGE VARCHAR2(3000);
          l_proj_flag number;
          l_quote_status_id number;
          l_orders_created number;
          l_chargeable_sr_flag number;
          l_sr_close_flag number;
          l_invalid_outage_info number;
     begin
          l_status := 'S';
          l_mesg := null;
          -- MO_GLOBAL.INIT('CS');
          -- Get the Project Service Request Id
          select incident_type_id into l_proj_incident_type_id
          from cs_incident_types_tl
          where name like 'XXX TAC Project'
--           and language = 'US'
          and rownum < 2;
          -- Get the ISR Service Request Id
          select incident_type_id into l_isr_incident_type_id
          from cs_incident_types_tl
          where name like 'XXX TAC ISR'
--           and language = 'US'
          and rownum < 2;
          -- Get the TNT TAC Service Request Id
          select incident_type_id into l_tac_incident_type_id
          from cs_incident_types_tl
          where name like 'XXX TAC Service Request'
          and rownum < 2;
--           and language = 'US';
          select nvl((select 1
          from dual
          where exists( select incident_status_id
                    from cs_incident_statuses_b
                    where incident_status_id = p_status_id
                    and close_flag is not null
                    and close_flag = 'Y')
and ( p_resolution_code is null
or (p_resolution_code NOT IN ('CS_SR_CLOSED_AS_DUP', 'XXXXX_SR_CXL', 'XXXXX_SR_INFO', 'XXXXX_SR_MGMT')
     and p_sr_type_id in ( l_isr_incident_type_id )),0) into l_chargeable_sr_flag
     from dual;
          select nvl((select 1
          from dual
          where exists( select incident_status_id
                    from cs_incident_statuses_b
                    where incident_status_id = p_status_id
                    and close_flag is not null
                    and close_flag = 'Y')
and ( p_resolution_code is null
or (p_resolution_code NOT IN ('CS_SR_CLOSED_AS_DUP', 'XXXXX_SR_CXL', 'XXXXX_SR_INFO', 'XXXXX_SR_MGMT')
     ),0) into l_sr_closing_flag
     from dual;
     if ( l_sr_closing_flag = 1 and ((p_resolution_summary is null) or (p_resolution_summary = FND_API.G_MISS_CHAR)) ) then
                    x_status := 'F';
                    --x_mesg := 'Resolution Summary can not be empty while closing Service request';
                    fnd_message.set_name ('XXXXX', 'MISSING_RESOLUTION_SUMMARY');     
                    -- fnd_message.set_token ('MESG_PARAM', err_mesg || '::' || l_mesg);
                    fnd_msg_pub.ADD;     
     end if;
          -- Check whether outage information is complete at the time of closure.
     if ( l_sr_closing_flag = 1 ) then
          l_invalid_outage_info := 0;
     select nvl((select 1
from dual
where exists ( select 1
                              from cs_incidents_ext cie, ego_fnd_dsc_flx_ctx_ext grp1
                              where incident_id = p_service_request_id
                              and grp1.application_id = 170
                                        and grp1.descriptive_flexfield_name like 'XX_SR_CONTEXT'
                                        and grp1.descriptive_flex_context_code like 'XXXXXOutageTab'
                                        and cie.attr_group_id = grp1.attr_group_id
                                        and ( c_ext_attr1 is null or c_ext_attr2 is null or c_ext_attr3 is null or
                                             c_ext_attr4 is null or c_ext_attr5 is null or c_ext_attr6 is null or
                                             c_ext_attr7 is null or n_ext_attr1 is null or n_ext_attr2 is null or
                                             n_ext_attr3 is null or n_ext_attr4 is null or n_ext_attr5 is null or
                                             d_ext_attr1 is null or d_ext_attr2 is null or d_ext_attr3 is null)
                         -- if all of them are null then we should ignore
                                        and NOT ( c_ext_attr1 is null and c_ext_attr2 is null and c_ext_attr3 is null and
                                             c_ext_attr4 is null and c_ext_attr5 is null and c_ext_attr6 is null and
                                             c_ext_attr7 is null and n_ext_attr1 is null and n_ext_attr2 is null and
                                             n_ext_attr3 is null and n_ext_attr4 is null and n_ext_attr5 is null and
                                             d_ext_attr1 is null and d_ext_attr2 is null and d_ext_attr3 is null))), 0) into l_invalid_outage_info
from dual;
                    if ( l_invalid_outage_info = 1 )     then
                         x_status := 'F';
                         fnd_message.set_name ('XXXXX', 'MISSING_OUTAGE_INFORMATION');     
                         fnd_msg_pub.ADD;     
                    end if;
     end if;
          if ( (p_sr_type_id in ( l_isr_incident_type_id )) and (l_chargeable_sr_flag = 1) ) then
               if ( ( p_bill_to_customer_id is null or     p_bill_to_cust_account_id is null or
               p_bill_to_customer_site_id is null )) then
                    x_status := 'F';
                    --x_mesg := 'Bill to customer name/account/site is empty';
                    fnd_message.set_name ('XXXXX', 'ISR_INVALID_BILL_TO');     
                    -- fnd_message.set_token ('MESG_PARAM', err_mesg || '::' || l_mesg);
                    fnd_msg_pub.ADD;
               else
                    select count(*) into l_orders_created
                    from cs_incident_links
                    where subject_id = p_service_request_id
                    and subject_type = 'SR'
                    and object_type = 'ORDERS';
                    /* If orders are not created for this SR then create the order */
                    if ( l_orders_created = 0 ) then
                    /* Create Order */
                    err_mesg := 'Got the Incident Types and Incidents Status flag';
                    select nvl((select quote_status_id
                    from aso_quote_statuses_tl
                    where language = 'US'
                    and upper(meaning) = 'ENTERED'), 0) into l_quote_Status_id
                    from dual;
                    err_mesg := 'Got the Quote Status Id';
                    l_qte_rec.party_id := p_bill_to_customer_id;
*                    l_qte_rec.party_id := p_bill_to_customer_id;
*                    l_qte_rec.cust_party_id := p_bill_to_customer_id;
*                    l_qte_rec.cust_account_id := p_bill_to_cust_account_id;
*                    l_qte_rec.INVOICE_TO_CUST_PARTY_ID  := p_bill_to_customer_id;
*                    l_qte_rec.INVOICE_TO_CUST_ACCOUNT_ID  := p_bill_to_cust_account_id;
*                    l_qte_rec.INVOICE_TO_PARTY_SITE_ID  := p_bill_to_customer_site_id;
*                    l_qte_rec.INVOICE_TO_PARTY_ID := p_bill_to_customer_id;
*                    l_qte_rec.quote_status_id := l_quote_status_id;
*                    l_qte_rec.quote_status_code := 'ENTERED';
*                    l_qte_rec.quote_status := 'ENTERED';
*                    l_control_rec.book_flag := 'N';
*                    err_mesg := 'set the Quote Header';*
*                    select nvl((select transaction_type_id*
*                    from oe_transaction_types_v*
*                    where name like 'Service Order'), 0 ) into l_qte_rec.order_type_id*
*                    from dual;*
*                    err_mesg := 'Got Order Type';*
*                    l_qte_rec.currency_code := 'USD';
how to insert rows in tmp table from rec_type which is in bold text .... i want to insert after the last statement .this is for debugging after executing the procedure

No version number and lots of other missing information.
That said look at the example here:
http://www.morganslibrary.org/reference/insert.html
under "RECORD INSERT."

Similar Messages

  • *Urgent*How to insert data from MS SQL to the table that create at the adobe form?

    Hi,
    I'm using Adobe life cycle designer 8 to do my interactive form. I would like to ask how to insert data from MS SQL to the table that i have created in my adobe interactive form?
    I really need the information ASAP as i need to hand in my project by next week... i really appreciate any one who reply this post.
    Thanks

    Tou need to do a couple of things
    1. On the Essbase server, set up an odbc system connection to your MySQL database
    2. In the load rule , go to the file menu and select open SQL data source and in the data source put in your SQL statement . A couple of hints. Where it says Select, don't put in the word select and where it say from don't put in from. The system adds them for you. The easiest way ti enter a SQL statement is to do it all in the select area So if your SQL would normanlly say select * from mytable just enter the code as * from mytable in the select area
    The click ol/retrieve and enter in your connection info. Itshould bring data back into the load rule. Save the load rule and use it

  • Insert records from report program into R3 table

    Hi
    I wanted to insert records from report program into R3 table.
    here is my code
    data : itab type standard table of zemp initial size 10 with header line.
    itab-EMPNO = '012'.
    itab-ENAME = 'XXXX'.
    itab-JOB = 'XXXX'.
    APPEND itab.
    insert ztable from table itab.
    but i am getting the following error
    the type of the data base table and work area/internal table "ITAB" are no unicode-converible.
    how can I insert records from report program into R3 table
    should I have to write move corresponding
    pls guide
    thanks
    manian

    Hi,
    itab-EMPNO = '012'.
    itab-ENAME = 'XXXX'.
    itab-JOB = 'XXXX'.
    APPEND itab.
    insert ztable from table itab.
    Do one thing
    Data : itab type table of ztable with header line.
    itab-EMPNO = '012'.
    itab-ENAME = 'XXXX'.
    itab-JOB = 'XXXX'.
    APPEND itab.
    insert ztable from table itab.
    error will resolve, then try to make structure similar to ZTABLE

  • Inserting data from jsp form to multiple tables !

    Hi,
    I want to insert data from jsp form to two tables
    tables are
    (1) Form
    formId (PK)
    deptName
    (2) Data
    formId (FK)
    sNo
    description
    itemCode
    and the problem is that i want to save information form a jsp form to above two tables and i have only one form.
    so how do i insert data from a jsp form to multiple tables.

    You already know what your form in the jsp will be and what fields they are. You also already know what your database looks like. Using one form, you should be able to break the data down, and give it certain ids and/or names, so that when the form is submitted, you retrieve the correct values corresponding to a specific field and insert it.
    Unless there is something else I am not catching, this seems pretty straight forward.

  • Inserting values from a cursor to a table

    Hi,
    I need to insert the values from a cursor into a table,this i the part of code which trieds to do it...i get error stating "select stmt missing"...pls help out...
    OPEN  p_cursor for V_SQLSTATEMENT;
            ---for i in p_cursor
            LOOP
              FETCH p_cursor INTO v_cursor_type;      
              insert into TEMPCHARTVALUES(HOP,AMOUNT,EFFECTIVE_FROM,EFFECTIVE_TO,CURRENCY)
                   values (v_cursor_type.PMC1_HOP_CODE,
                         v_cursor_type.PMC1_Amount,
                         v_cursor_type.PMC1_EFFECTIVE_FROM,
                         v_cursor_type.PMC1_EFFECTIVE_UPTO,
                         v_cursor_type.PMC1_CURRENCY);
                                                           --dbms_output.put_line(v_cursor_type.KEYCODE1);
              EXIT WHEN p_cursor%ROWCOUNT = v_REC_COUNT;
              end loop;

    Hi, here it is..
    create or replace
    procedure  prm_sp_charts_db (P_CURSOR OUT SYS_REFCURSOR,CHARTCode VARCHAR,tablename varchar)
    IS
    v_COUNT varchar2(200);
    v_REC_COUNT NUMBER;
    V_SQLSTATEMENT VARCHAR2(2000);
    v_cursor_type  TEMPCHARTVALUES%ROWTYPE;
        begin
         v_COUNT:='SELECT COUNT(*) FROM PRM_M_Chart_' || CHARTCode;
         execute immediate v_COUNT into v_REC_COUNT;
         V_SQLSTATEMENT := 'SELECT ';
         V_SQLSTATEMENT := V_SQLSTATEMENT || 'PMC' || CHARTCode || '_F1_CODE Keycode1,';
          open  P_CURSOR for select column_name from  user_tab_columns where table_name=tablename and column_name='PMC' || CHARTCode || '_F2_CODE';
          IF P_CURSOR%FOUND then
          V_SQLSTATEMENT := V_SQLSTATEMENT || 'PMC' || CHARTCode || '_F2_CODE Keycode2,';
          else
          V_SQLSTATEMENT := V_SQLSTATEMENT || '0,';
          END IF;
          open  P_CURSOR for select column_name from  user_tab_columns where table_name=tablename and column_name='PMC' || CHARTCode || '_F3_CODE';
          IF P_CURSOR%FOUND then
          V_SQLSTATEMENT := V_SQLSTATEMENT || 'PMC' || CHARTCode || '_F3_CODE Keycode3,';
          else
          V_SQLSTATEMENT := V_SQLSTATEMENT || '0,';
          END IF;
           open  P_CURSOR for select column_name from  user_tab_columns where table_name=tablename and column_name='PMC' || CHARTCode || '_F4_CODE';
          IF P_CURSOR%FOUND then
          V_SQLSTATEMENT := V_SQLSTATEMENT || 'PMC' || CHARTCode || '_F4_CODE Keycode4,';
          else
          V_SQLSTATEMENT := V_SQLSTATEMENT || '0,';
          END IF;
          open  P_CURSOR for select column_name from  user_tab_columns where table_name=tablename and column_name='PMC' || CHARTCode || '_F5_CODE';
          IF P_CURSOR%FOUND then
          V_SQLSTATEMENT := V_SQLSTATEMENT || 'PMC' || CHARTCode || '_F5_CODE Keycode5,';
          else
          V_SQLSTATEMENT := V_SQLSTATEMENT || '0,';
          END IF;
          --open  P_CURSOR for select column_name from  user_tab_columns where table_name=tablename and column_name='PMC' || CHARTCode || '_F6_CODE';
          IF P_CURSOR%FOUND then
          V_SQLSTATEMENT := V_SQLSTATEMENT || 'PMC' || CHARTCode || '_F6_CODE Keycode6,';
          else
          V_SQLSTATEMENT := V_SQLSTATEMENT || '0,';
          END IF;
          --open  P_CURSOR for select column_name from  user_tab_columns where table_name=tablename and column_name='PMC' || CHARTCode || '_F7_CODE';
          IF P_CURSOR%FOUND then
          V_SQLSTATEMENT := V_SQLSTATEMENT || 'PMC' || CHARTCode || '_F7_CODE Keycode7,';
          else
          V_SQLSTATEMENT := V_SQLSTATEMENT || '0,';
          END IF;
          --open  P_CURSOR for select column_name from  user_tab_columns where table_name=tablename and column_name='PMC' || CHARTCode || '_F8_CODE';
          IF P_CURSOR%FOUND then
          V_SQLSTATEMENT := V_SQLSTATEMENT || 'PMC' || CHARTCode || '_F8_CODE Keycode8,';
          else
          V_SQLSTATEMENT := V_SQLSTATEMENT || '0,';
          END IF;
          --open  P_CURSOR for select column_name from  user_tab_columns where table_name=tablename and column_name='PMC' || CHARTCode || '_F9_CODE';
          IF P_CURSOR%FOUND then
          V_SQLSTATEMENT := V_SQLSTATEMENT || 'PMC' || CHARTCode || '_F9_CODE Keycode9,';
          else
          V_SQLSTATEMENT := V_SQLSTATEMENT || '0,';
          END IF;
          --open  P_CURSOR for select column_name from  user_tab_columns where table_name=tablename and column_name='PMC' || CHARTCode || '_F10_CODE';
          IF P_CURSOR%FOUND then
          V_SQLSTATEMENT := V_SQLSTATEMENT || 'PMC' || CHARTCode || '_F10_CODE Keycode10,';
          else
          V_SQLSTATEMENT := V_SQLSTATEMENT || '0,';
          END IF;
          V_SQLSTATEMENT := V_SQLSTATEMENT ||'PMC' || CHARTCode || '_HOP_CODE HOPCode,PMC' || CHARTCode || '_AMOUNT ,PMC'|| CHARTCode || '_EFFECTIVE_FROM Effective_From,PMC' || CHARTCode || '_EFFECTIVE_UPTO Effective_Upto,PMC' || CHARTCode || '_CURRENCY Currency FROM PRM_M_CHART_' || CHARTCode ;
          DBMS_OUTPUT.PUT_LINE(V_SQLSTATEMENT);
           OPEN  p_cursor for V_SQLSTATEMENT;
            ---for i in p_cursor
            LOOP
              FETCH p_cursor INTO v_cursor_type;      
              insert into TEMPCHARTVALUES(HOP,AMOUNT,EFFECTIVE_FROM,EFFECTIVE_TO,CURRENCY)
                   values (v_cursor_type.PMC1_HOP_CODE,
                         v_cursor_type.PMC1_Amount,
                         v_cursor_type.PMC1_EFFECTIVE_FROM,
                         v_cursor_type.PMC1_EFFECTIVE_UPTO,
                         v_cursor_type.PMC1_CURRENCY);
                                                           --dbms_output.put_line(v_cursor_type.KEYCODE1);
              EXIT WHEN p_cursor%ROWCOUNT = v_REC_COUNT;
              end loop;
    end prm_sp_charts_db;

  • How to delete a row from a SQL Server CE Table with multiple JOINs?

    I want to delete a record from a SQL Server CE table.
    There are 3 tables scripts, options and results. I would like to remove a record from the results table. The where clause contains dynamic information which retrieved via other queries to different tables in the same database. These queries work fine and deliver
    the desired data.
    The Compact server is a clone of a remote table created using the sync framework. The same query to the remote table works fine.
    The error I get is:
    There was an error parsing the query. [ Token line number = 1,Token line offset = 10,Token in error = from ]
    The code that throws the exception is as follows:
    Dim connLoc As SqlCeConnection = New SqlCeConnection(My.Settings.ConnectionString)connLoc.Open()     Dim strDel As String = "Delete r from ResultsTable r inner join OptionsTable o ON o.TestName=r.TestName inner join ScriptTable c ON r.TestName=c.TestName WHERE r.TestName = '" & ds1Loc.Tables(0).Rows(0)(1) & "' AND [Index] = '" & lstIndex & "'"Dim cmdDel As SqlCeCommand = New SqlCeCommandcmdDel.CommandText = strDelcmdDel.Connection = connLoccmdDel.ExecuteNonQuery()
    The values held in ds1Loc.Tables(0).Rows(0)(1) and lstIndex are
    correct so should not be the problem.
    I also tried using parameterised queries
    Dim strDel As String = "Delete r from [ResultsTable] r inner join [OptionsTable] o ON o.TestName=r.TestName inner join [ScriptTable] c ON r.TestName=c.TestName WHERE r.TestName = @TestName AND [Index] = @lstIndex"
    Dim cmdDel As SqlCeCommand = New SqlCeCommand        cmdDel.CommandText = strDel       
    With cmdDel.Parameters           
    .Add(New SqlCeParameter("@TestName", ds1Loc.Tables(0).Rows(0)(1)))           
    .Add(New SqlCeParameter("@lstIndex", lstIndex))       
    End With 
    cmdDel.Connection = connLoc        cmdDel.ExecuteNonQuery()
    I have tried replacing the "=" with "IN" in the the WHERE clause but this has not worked.
    Is it the join that is causing the problem? I can do a select with the same search criteria and joins from the same database.
    Also this query works with SQL Server. Is it perhaps that SQL CE does not support the Delete function the same as SQL Server 2008? I have been looking at this for a while now and cannot find the source of the error. Any help would be greatly appreciated.

    Hello,
    In SQL Server Compact, we can use join in FROM clause. The DELETE statement fail may be caused by the FOREIGN KEY constraint.
    Please refer to:
    DELETE (SQL Server Compact)
    FROM Clause (SQL Server Compact)
    Regards,
    Fanny Liu
    Fanny Liu
    TechNet Community Support

  • Insert records from user form to multiple tables in same database

    Hi Experts, I need your help. I have a form that has multiple text fields that I need to insert the records to their each respective table. For example: The first name field needs to go the the name table, address goes to a seperate table, phone goes to a seperate table and so on.
    Is this possible to do?
    Thanks Much
    Sham

    The same for ASP, JSP or PHP.  Just the code syntax is different for each language.  Are you using MySQL, Access or ?
    In any case, create the three recordsets on the database and use insert queries.  If you don't know what one is, google insert query and you will see the syntax. 
    Here is a good example out on the web
    http://www.stardeveloper.com/articles/display.html?article=2000032601&page=1
    In your case you would get the values for the inserts from the form data and only need to open the database connection once.
    Good luck.
    Walt
    B & B Photography

  • Insert date from YUI calendar into mysql table

    Is there a way to insert the date selected from the YUI calendar into a mysql table?

    I have been in trouble since last 2 days... I have tried all possible and explored any related topics.. Still I cannot address the problem.
    Problem 1:
    I have a simple jsp form which passed a bengali word.
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    <form action="Test2.jsp" method="post" >
    <input type="text" value="&#2453;&#2494;&#2453;&#2494;" name="word">
    <input type="submit" value="Next">
    </form>
    </body>
    </html>
    When this page is post, a java program( TestWord) is called by the Test2.jsp. TestWord insert the passed bengali word into a MySQL table. Then it retrieves again the inserted bengali word and display in Test2.jsp.
    Test2.jsp:----
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <jsp:useBean id="get2" class="dictionary.TestWord" scope="session"/>
    <jsp:setProperty name="get2" property="*"/>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    </head>
    <body>
    <form action="" method="post">
    <%
    String s=get2.getWord();
    out.write("Before converion onversion = "+s);
    s = new String(s.getBytes("ISO-8859-1"),"UTF-8");
    out.write(" After conversion = "+s);
    %>
    </form>
    </body>
    </html>
    It gives the output something like:
    Before conversion = &#65533;?&#2494;&#65533;?&#2494; After conversion = ??????
    Problem 2:
    The record in mysql table is inserted in bengali font (eg. &#2453;&#2494;&#2453;&#2494;). When I retrieve the record and display in a jsp page, I can see the bengali word (&#2453;&#2494;&#2453;&#2494;) properly. But if I insert the bengali word again in MySql table, then I see some string like "&#65533;?&#2494;&#65533;?&#2494;" storing in the table.
    Please help me out..
    Thanks in advance.

  • Import/insert data from XML into Oracle database tables?

    Hi. (I am using JDeveloper 10.1.3.3.0 and Oracle 10g)
    I have been able to export the data from one of my database tables by using a View Object and .writeXML.
    Now, I want to take an xml file that is formatted in the same way as what is spit out by the writeXML and put that info in my database table. I followed online examples and have tried using .readXML like so:
    Element element = XMLDoc.getDocumentElement();
    vo.readXML(element, -1);
    I know it is sort of working, because at first I got an error message that one of the required attributes was missing. So, I added that attribute to my xml file and ran my code. No errors. But, I checked my database, and the new records were not added.
    Is there something I have done wrong? Or is there perhaps something I left out? I also noticed there were several versions of readXML like readFromXML. Which one should I use and how?
    Thanks.

    KUBA, I changed my code to match your example:
    DocumentBuilder db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
    File xmlFile = new File("C:/myfilehere.xml");
    Document doc = db.parse(xmlFile);
    Element element = doc.getDocumentElement();
    vo.readXML(element, -1);
    vo.getDBTransaction().commit();
    I still get no errors, but my database table has no new records.
    Any ideas why?
    Thanks.

  • How to insert row in the middle of a table so that the below content will move to another page?

    I'm making a huge form in LiveCycle Designer. I want to be able to add rows in the middle o the table but in a way that the content below will move down automatically in a way it doe's in Word for example.
    Sometimes I am adding a very high new row in the middle of a page and I want the content in the below rows to be moved to another page and if it is necessary I want a new page to be automatically created on the bottom of a document or something.
    Is this possible or do I have to move everything by hand if I add new row to a table?

    If you are adding the rows at the runtime by clicking a button, then you have to use the instance Manager to add rows.. It will add rows at the end and then you need to write code to move the row at the desired location by using the moveInstance method of the instanceManager.
    If you are adding a row at the design time, then you can right clcik the row and choose to add rows below.
    Thanks
    Srini

  • Cannot delete newly inserted row from a table

    Dear all,
    There is a table where I have just inserted a new record. I can do a select query on that record and even update it. However when I try to delete the record, my session hangs and the record does not gets deleted. I also do not get a error message.
    Does anyone knows what the problem could be ?
    Thanks in advance
    L

    How many rows are in that table?
    from another session, what is that session waiting on?
    select sid, event, total_waits, time_waited, round(average_wait,4) as average_wait
    , (round( (time_waited/m_sum), 4)*100)|| '%' as pct_tot_wait
    from v$session_event, (
    select sum(time_waited) m_sum
    from v$session_event
    where sid = <sid_of_hanging_session>
    ) s
    where sid = <sid_of_hanging_session>
    order by 4 desc;

  • How to insert rows from an  xml file to a table

    im Using Oracle 11g It is showing below error when i execute..
    declare
    charString varchar2(80);
    finalStr varchar2(400) := null;
    rowsp integer;
    v_FileHandle UTL_FILE.FILE_TYPE;
    begin
    -- the name of the table as specified in our DTD
    xmlgen.setRowsetTag('Zipcodes');
    -- the name of the data set as specified in our DTD
    xmlgen.setRowTag('mappings');
    -- for getting the output on the screen
    dbms_output.enable(100000);
    -- open the XML document in read only mode
    v_FileHandle := utl_file.fopen(TMP_DIR1,'XML_NEW_CITIES.XML', 'r');
    loop
    BEGIN
    utl_file.get_line(v_FileHandle, charString);
    exception
    when no_data_found then
    utl_file.fclose(v_FileHandle);
    exit;
    END;
    dbms_output.put_line(charString);
    if finalStr is not null then
    finalStr := finalStr || charString;
    else
    finalStr := charString;
    end if;
    end loop;
    -- for inserting the XML data into the table
    rowsp := xmlgen.insertXML('SYS.ZIPCODES',finalStr);
    dbms_output.put_line('INSERT DONE '||TO_CHAR(rowsp));
    xmlgen.resetOptions;
    end;
    XML_NEW_CITIES.XML is
    <?xml version = '1.0'?>
    <Zipcodes>
    <mappings Record="4">
    <STATE_ABBREVIATION>CA</STATE_ABBREVIATION>
    <ZIPCODE>94301</ZIPCODE>
    <CITY>Palo Alto</CITY>
    </mappings>
    <mappings Record="5">
    <STATE_ABBREVIATION>CO</STATE_ABBREVIATION>
    <ZIPCODE>80323</ZIPCODE>
    <ZIP_CODE_EXTN>9277</ZIP_CODE_EXTN>
    <CITY>Boulder</CITY>
    </mappings>
    </Zipcodes>
    Error report:
    ORA-06550: line 8, column 3:
    PLS-00201: identifier 'XMLGEN.SETROWSETTAG' must be declared
    ORA-06550: line 8, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 10, column 3:
    PLS-00201: identifier 'XMLGEN.SETROWTAG' must be declared
    ORA-06550: line 10, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 14, column 34:
    PLS-00201: identifier 'TMP_DIR1' must be declared
    ORA-06550: line 14, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 31, column 12:
    PLS-00201: identifier 'XMLGEN.INSERTXML' must be declared
    ORA-06550: line 31, column 3:
    PL/SQL: Statement ignored
    ORA-06550: line 33, column 3:
    PLS-00201: identifier 'XMLGEN.RESETOPTIONS' must be declared
    ORA-06550: line 33, column 3:
    PL/SQL: Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error
    Edited by: 898235 on Nov 20, 2011 11:02 PM

    OK, then did you try the XMLTable example, or are you waiting for someone to write it all down for you? :)
    You first have to create an Oracle directory object pointing to the physical location of your file (must be somewhere on the db server or at least a location the db server can access on the network).
    Then create the procedure, in this case a simple INSERT SELECT :
    SQL> create directory tmp_dir as 'c:\temp';
    Directory created
    SQL> create table zipcodes (
      2   state_abbreviation  varchar2(2),
      3   zipcode             varchar2(5),
      4   zip_code_extn       varchar2(10),
      5   city                varchar2(80)
      6  );
    Table created
    SQL> CREATE OR REPLACE PROCEDURE insertZipcodes (
      2    p_directory IN VARCHAR2
      3  , p_filename  IN VARCHAR2
      4  )
      5  IS
      6  BEGIN
      7 
      8    INSERT INTO zipcodes (state_abbreviation, zipcode, zip_code_extn, city)
      9    SELECT state_abbreviation
    10         , zipcode
    11         , zip_code_extn
    12         , city
    13    FROM XMLTable('/Zipcodes/mappings'
    14           passing xmltype(bfilename(p_directory, p_filename), nls_charset_id('AL32UTF8'))
    15           columns state_abbreviation varchar2(2)  path 'STATE_ABBREVIATION'
    16                 , zipcode            varchar2(5)  path 'ZIPCODE'
    17                 , zip_code_extn      varchar2(10) path 'ZIP_CODE_EXTN'
    18                 , city               varchar2(80) path 'CITY'
    19         )
    20    ;
    21 
    22  END;
    23  /
    Procedure created
    SQL> exec insertZipcodes('TMP_DIR', 'xml_new_cities.xml');
    PL/SQL procedure successfully completed
    SQL> commit;
    Commit complete
    SQL> select * from zipcodes;
    STATE_ABBREVIATION ZIPCODE ZIP_CODE_EXTN CITY
    CA                 94301                 Palo Alto
    CO                 80323   9277          Boulder

  • Inserting rows from a table

    Hi
    I have A table with the following structure:
    -category- -id_no- -class_com-
    06 23 45678
    06 23 32345
    06 23 45345
    05 24 (null)
    07 25 (null)
    08 26 (null)
    I would like to insert the three values in class_com into the same table and for each category 05, 07, and 08.
    The table would be like this:
    -category- -id_no- -class_com-
    06 23 45678
    06 23 32345
    06 23 45345
    05 24 45678
    05 24 32345
    05 24 45345
    07 25 45678
    07 25 32345
    07 25 45345
    08 26 45678
    08 26 32345
    08 26 45345
    Thanks
    stone

    Hi,
    Try this one
    create table a(category number,id_no number,class_com number);
    insert into a values(06,23,45678);
    insert into a values(06,23,32345);
    insert into a values(06,23,45345);
    insert into a values(05,24,null);
    insert into a values(07,25,null);
    insert into a values(08,26,null);
    update a set class_com = 45678 where category in(5,7,8);
    insert into a values(05,24,32345);
    insert into a values(05,24,45345);
    insert into a values(07,25,32345);
    insert into a values(07,25,45345);
    insert into a values(08,26,32345);
    insert into a values(08,26,45345);
    Regards,
    Fame

  • How to insert data from APEX form into two tables

    Hi,
    I'm running APEX 4.1 with Oracle XE 11g, having two tables CERTIFICATES and USER_FILES. Some of the (useless) fields are cut to reduce information:
    CREATE TABLE CERTIFICATES
    CERT_ID NUMBER NOT NULL ,
    CERT_OWNER NUMBER NOT NULL ,
    CERT_VENDOR NUMBER NOT NULL ,
    CERT_NAME VARCHAR2 (128) ,
    CERT_FILE NUMBER NOT NULL ,
    ) TABLESPACE CP_DATA
    LOGGING;
    ALTER TABLE CERTIFICATES
    ADD CONSTRAINT CERTIFICATES_PK PRIMARY KEY ( CERT_ID ) ;
    CREATE TABLE USER_FILES
    FILE_ID NUMBER NOT NULL ,
    FILENAME VARCHAR2 (128) ,
    BLOB_CONTENT BLOB ,
    MIMETYPE VARCHAR2 (32) ,
    LAST_UPDATE_DATE DATE
    ) TABLESPACE CP_FILES
    LOGGING
    LOB ( BLOB_CONTENT ) STORE AS SECUREFILE
    TABLESPACE CP_FILES
    STORAGE (
    PCTINCREASE 0
    MINEXTENTS 1
    MAXEXTENTS UNLIMITED
    FREELISTS 1
    BUFFER_POOL DEFAULT
    RETENTION
    ENABLE STORAGE IN ROW
    NOCACHE
    ALTER TABLE USER_FILES
    ADD CONSTRAINT CERT_FILES_PK PRIMARY KEY ( FILE_ID ) ;
    ALTER TABLE CERTIFICATES
    ADD CONSTRAINT CERTIFICATES_USER_FILES_FK FOREIGN KEY
    CERT_FILE
    REFERENCES USER_FILES
    FILE_ID
    NOT DEFERRABLE
    What I'm trying to do is to allow users to fill out all the certificate data and upload a file in an APEX form. Once submitted the file should be uploaded in the USER_FILES table and all the fields along with CERT_ID, which is the foreign key pointing to the file in the USER_FILES table to be populated to the CERTIFICATES table. APEX wizard forms are based on one table and I'm unable to build form on both tables.
    That's why I've created a view (V_CERT_FILES) on both tables and using INSTEAD OF trigger to insert/update both tables. I've done this before and updating this kind of views works perfect. Here is where the problem comes, if I'm updating the view all the data is updated correctly, but if I'm inserting into the view all the fields are populated at CERTIFICATES table, but for USER_FILES only the fields FILE_ID and LAST_UPDATE_DATE are populated. The rest three regarding the LOB are missing: BLOB_CONTENT, FILENAME, MIMETYPE. There are no errors when running this from APEX, but If I try to insert into the view from SQLDeveloper, I got this error:
    ORA-22816: unsupported feature with RETURNING clause
    ORA-06512: at line 1
    As far as I know RETURNING clause in not supported in INSTEAD of triggers, although I didn't have any RETURNING clauses in my trigger (body is below).
    Now the interesting stuff, after long tracing I found why this is happening:
    First, insert is executed and the BLOB along with all its properties are uploaded to wwv_flow_file_objects$.
    Then the following insert is executed to populate all the fields except the BLOB and it's properties, rowid is RETURNED, but as we know RETURNING clause is not supported in INSTEAD OF triggers, that's why I got error:
    PARSE ERROR #1918608720:len=266 dep=3 uid=48 oct=2 lid=48 tim=1324569863593494 err=22816
    INSERT INTO "SVE". "V_CERT_FILES" ( "CERT_ID", "CERT_OWNER", "CERT_VENDOR", "CERT_NAME", "BLOB_CONTENT") VALUES (:B1 ,:B2 ,:B3 ,:B4, ,EMPTY_BLOB()) RETURNING ROWID INTO :O0
    CLOSE #1918608720:c=0,e=11,dep=3,type=0,tim=1324569863593909
    EXEC #1820672032:c=3000,e=3168,p=0,cr=2,cu=4,mis=0,r=0,dep=2,og=1,plh=0,tim=1324569863593969
    ERROR #43:err=22816 tim=1324569863593993
    CLOSE #1820672032:c=0,e=43,dep=2,type=1,tim=1324569863594167
    Next my trigger gets in action, sequences are generated, CERTIFICATES table is populated and then USER_FILES, but only the FILE_ID and LAST_UPDATE_DATE.
    Finally update is fired against my view (V_CERT_FILES), reading data from wwv_flow_files it populates BLOB_CONTENT, MIMETYPE and FILENAME fields at the specific rowid in V_CERT_FILES, the one returned from the insert at the beginning. Last, file is deleted from wwv_flow_files.
    I'm using sequences for the primary keys, this is only the body of the INSTEAD OF trigger:
    select user_files_seq.nextval into l_file_id from dual;
    select certificates_seq.nextval into l_cert_id from dual;
    insert into user_files (file_id, filename, blob_content, mimetype, last_update_date) values (l_file_id, :n.filename, :n.blob_content, :n.mimetype, sysdate);
    insert into certificates (cert_id, cert_owner, cert_vendor, cert_name, cert_file) values (l_cert_id, :n.cert_owner, :n.cert_vendor, :n.cert_name, l_file_id);
    I'm surprised that I wasn't able to find a valuable source of information regarding this problem, only MOS note about running SQLoader against view with CLOB column and INSTEAD OF trigger. The solution would be to ran it against base table, MOS ID 795956.1.
    Maybe I'm missing something and that's why I decided to share my problem here. So my question is how do you create this kind of architecture, insert into two tables with a relation between them in APEX ? I read a lot in the Internet, some advices were for creating custom form with APEX API, create a custom ARP, create two ARP or create a PL/SQL procedure for handing the DML?
    Thanks in advance.
    Regards,
    Sve

    Thank you however I was wondering if there was an example available which uses EJB and persistence.

  • Not uploading more than 150 rows from Excel file to Internal table.

    Hi All,
    We have a Z program to upload initial stock from excel file to SAP using BAPI. The problem is we have defined row to '65536'. But it is not uploading more than 150 rows at a time. The piece of code is given below.
    DATA : it_excel LIKE alsmex_tabline OCCURS 0 WITH HEADER LINE.
    DATA: xcel TYPE TABLE OF alsmex_tabline WITH HEADER LINE.
    DATA : gd_scol   TYPE i VALUE '1',
           gd_srow   TYPE i VALUE '3',
           gd_ecol   TYPE i VALUE '256',
           gd_erow   TYPE i VALUE '65536'.
    PERFORM upload_excel_file TABLES   gt_out
                                  USING   p_file
                                          gd_scol
                                          gd_srow
                                          gd_ecol
                                          gd_erow.
    FORM upload_excel_file  TABLES   gt_out
                                       "Insert correct name for <...>
                            USING    p_p_file
                                     p_gd_scol
                                     p_gd_srow
                                     p_gd_ecol
                                     p_gd_erow.
      DATA : lt_intern TYPE  kcde_cells OCCURS 0 WITH HEADER LINE.
      DATA : ld_index TYPE i.
      FIELD-SYMBOLS: <fs> TYPE ANY.
      CALL FUNCTION 'KCD_EXCEL_OLE_TO_INT_CONVERT'
        EXPORTING
          filename    = p_p_file
          i_begin_col = p_gd_scol
          i_begin_row = p_gd_srow
          i_end_col   = p_gd_ecol
          i_end_row   = p_gd_erow
        TABLES
          intern      = lt_intern[].
      IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
      IF lt_intern[] IS INITIAL.
        FORMAT COLOR COL_BACKGROUND INTENSIFIED.
        WRITE:/ 'No Data Uploaded'.
        EXIT.
      ELSE.
        SORT lt_intern BY row col.
        LOOP AT lt_intern.
          MOVE lt_intern-col TO ld_index.
          ASSIGN COMPONENT ld_index OF STRUCTURE gt_out TO <fs>.
          MOVE lt_intern-value TO <fs>.
          AT END OF row.
            APPEND gt_out.
            CLEAR gt_out.
          ENDAT.
        ENDLOOP.
      ENDIF.
    ENDFORM.           
    Plz tell me, what is the problem here. I want to upload all the rows at a time.
    Thanks,
    With regards,
    Rosaline.

    Hi Rob, I confirm, you're nitpicking! :-D For information, I've noted a few SAP comments about releasing and released objects, for people who like reading: [SAP Library - Documenting and Releasing a Function Module|http://help.sap.com/saphelp_nw70/helpdata/en/d1/801f50454211d189710000e8322d00/frameset.htm], [Note 109533 - Use of SAP function modules|https://service.sap.com/sap/support/notes/109533], [Note 415983 - Modification/customer developments of SAP function modules|https://service.sap.com/sap/support/notes/415983]; Example of an unreleased BAPI -> [Note 577453 - Using BAPI BAPI_DELIVERYPROCESSING_EXEC|https://service.sap.com/sap/support/notes/577453]
    Sandra

Maybe you are looking for

  • WindowsLookAndFeel on Linux : BIG  and complete PROBLEM

    Hello, I have implemented a GUI application with the windows look and feel. I work under Linux with the jdk 1.3 and eclipse. To run my application with the windows lf, I add the following lines in my code : System.setProperty("os.name","Not Windows")

  • "Intercompany Billing: Mandatory condition MWST is missing"

    Hi Guys During an intercompany billing, I am having - mandatory condition MWST is missing. In the Analysis I have - Access not executed (requirement 008 not fulfilled) How do I resolve this please.

  • JAXB compiler error : Complex Type Definition Representation Error

    Hi, I have a problem when I try to generate Java classes for the XML Digital Signature schema along with the XAdES extension. Apparently, we got an XML validation issue when the XAdES schema is parsed. Here is the xjc tool ouput : [ERROR] src-ct.1: C

  • Video Distortion after burning i.e. "tracing"

    Hello all. I have been working on this project for a couple weeks now. I do a lot of "copy and paste" edits where people bring in dvd's and other media and want me to put together a demo disc or something of that sort. This high school student has br

  • I am still covered w/ warranty

    they told me it has dents that I need to fix for $300, what should I do?