Problem formatting Form to update Table

I have been working on a portlet that list news headlines based on a user defined stock
symbol.
I am attempting to modify the form application to input the user defined stock symbol. The table containing the stock symbol has only one record. A default value has already been inserted.
I want users to abe able to update the record with a stock symbol of their choice via this form. I would like the form to only contain a Update button and an item field to hold the user defined stock symbol.
Unfortunately, the only way I have gotten the form to work is to include both a query
and update button along with the symbol field. When the form comes up the users sees
only the query button along with the symbol field. When the user clicks the query button, the symbol field is populated and the update button appears.
Any help you can provide that will help me to remove the query button and allow users to update the record with their user defined stock symbol is appreaciated.
null

Hi Steve,
If want to have a record already displayed in the form the link to the form needs to query the form, so that the record is displayed when the user initially goes to the form.
There are at least two ways of linking to the form, either a report displaying the link or a hand coded link.
the easiest way would be to write a report on the table and include this report as a portlet on the page that you link from.
regards
Michael

Similar Messages

  • Bad update table?

    Hi
    I have in FORM code:
    UPDATE Z_TABLE SET COL1 = 'value' WHERE COL2 = var
    And in this program is also many inserts and BDC codes.
    After execute all PERFORM is command  COMMIT WORK AND WAIT.
    Problem is only in update table Z_TABLE. Some rows in database don't have updated
    values.
    It is possible that this error exists because FORM is executed many times ?
    If I change this code to the one command: UPDATE Z_TABLE from itab, this repaire
    my all updates or maybe this is work the same like single record UPDATE?

    UPDATE dbtab - source
    Syntax
    ... { {SET set_expression [WHERE sql_cond]}
        | {FROM wa|{TABLE itab}} }.
    Alternatives:
    1. ... SET set_expression [WHERE sql_cond]
    2. ... FROM wa
    3. ... FROM TABLE itab
    Effect
    The specifications in source define which rows and columns are changed. Either individual columns are changed using the addition SET or entire rows are overwritten using the addition FROM.
    After FROM, either a non-table-type data object wa or an internal table itab can be specified. The content of these objects determines - on the one hand - which row(s) is/are changed, and
    - on the other hand - which values are used to overwrite the row(s).
    Alternative 1
    ... SET set_expression [WHERE sql_cond]
    Effect
    After the addition SET, the changes are specified in a list of change expressions in set_expression.
    The addition WHERE uses a logical expression sql_cond to define in which rows of the database table the changes are executed. For the logical expression sql_cond, the same applies as for the WHEREcondition of the statement SELECT, with the exception that no subqueries are to be evaluated in the database table to be changed. If no WHERE condition is specified, all the rows in the database table are changed. If a column of the type STRING or RAWSTRING is changed, the primary key must be fully specified in the WHERE condition.
    The content of primary key fields can only be changed if the respective database table is not linked with a search help and if pool and cluster tables are not accessed. If a link was to be created through the changes and this row would cause double entries in the primary key or a unique secondary index of the database table, no row is changed and sy-subrc is set to 4.
    Notes
    Before release 6.10, SET could only be specified for static specification of the database table.
    Before release 6.10, no dynamic logical expressions could be used in the WHERE condition of the statement UPDATE.
    Example
    Dynamic conversion of the content of an arbitrary column in an arbitrary database table of a previous currency in Euro.
    PARAMETERS: table    TYPE c LENGTH 30,
                column   TYPE c LENGTH 30,
                old_curr TYPE sycurr.
    DATA: set_expr  TYPE string,
          condition TYPE string.
    CONCATENATE column ` = 'EUR'`
                INTO set_expr.
    CONCATENATE column ` = old_curr`
                INTO condition.
    TRY.
        UPDATE (table)
        SET    (set_expr)
        WHERE  (condition).
      CATCH cx_sy_dynamic_osql_error.
        MESSAGE `Error in update!` TYPE 'I'.
    ENDTRY.
    Alternative 2
    ... FROM wa
    Effect
    If you specify a non-table-type work area wa, the system will search for a row in the database table which, in its primary key, has the same content as the respective beginning part of the work area. The content of the work area is interpreted in its non-converted form and in accordance with the structure of the database table or the view. The content of the work area is assigned to this row. The assignment takes place without conversion from the left to the right in accordance with the structure of the database table or the view. The work area must fulfill the prerequisites for use in Open SQL statements.
    If there is no row with the same content for the primary key in the database or if the change would lead to a double entry in a unique secondary index, the line is not changed and sy-subrc is set to 4.
    Notes
    The work area wa should always be declared in relation to the database table or the view in the ABAP Dictionary.
    If you have a static specification of the database table or the view, the specification of the work area using FROM wa can be omitted outside of classes - provided a table work area dbtab for the respective database table or the view is declared using the statement TABLES. The system expands the UPDATE statement implicitly to include the addition FROM dbtab.
    Alternative 3
    ... FROM TABLE itab
    Effect
    When an internal table itab is specified, the system processes all the rows of the internal table in accordance with the rules for the work area wa. The row type of the internal table must meet the requirements for use in Open-SQL statements.
    If, in the database, there is no row with the same content of the primary key for a row in the internal table, or if the change would lead to a double entry in a unique secondary key, the respective row is not changed and sy-subrc is set to 4. If the internal table is empty, sy-subrc is set to 0. The system field sy-dbcnt is always set to the number of rows actually inserted.
    Example
    Reduction of the flight cost for all of today's flights of an airline carrier in the database table SFLIGHT by the percentage percent. The calculation of the new price is always done in an internal table sflight_tab and the database table is changed accordingly.
    PARAMETERS: p_carrid TYPE sflight-carrid,
                percent  TYPE p LENGTH 1 DECIMALS 0.
    DATA sflight_tab TYPE TABLE OF sflight.
    FIELD-SYMBOLS <sflight> TYPE sflight.
    SELECT *
           FROM sflight
           INTO TABLE sflight_tab
           WHERE carrid = p_carrid AND
                 fldate = sy-datum.
    IF sy-subrc = 0.
      LOOP AT sflight_tab ASSIGNING <sflight>.
        <sflight>-price =
          <sflight>-price * ( 1 - percent / 100 ).
      ENDLOOP.
    ENDIF.
    UPDATE sflight FROM TABLE sflight_tab.

  • Is it possible to add new columns with format "Text" once a table is linked to a form

    Is it possible to add new columns with format "Text" once a table is linked to a form in Numbers for iPhone or is it impossible and thus a serious bug?(Rating stars and numeric vales seem to work.)
    Those bugs happen both for new speadsheets as well as existing onces, like the demo. When you are in the form only the numeric keyboard shows up.
    Pat from the Apple Store Rosenstrasse/Germany approved that it looks like a Bug during the Numbers Workshop I was in: It is not possible to add new columns with format "Text". I reported the error for Version 1.4 but there is no update nor do I get statement of understanding the issue.

    Hi Knochenhort,
    I see what you are talking about now. Without knowing how the program actually works, I think this is what's going on:
    When you add a new column to an already existing table (with already existing formats), the new cells come already formatted like the previous column. So when you add a column to the end of the demo table, the cells are already formatted like stars, and when you add a column to the beginning, they're already formatted like number.
    I think this is why it's different when if you add columns to a table with blank (unformatted) columns. In that case, the new cells aren't already "tainted" with a set format, so you can change to text format without issue.
    It seems like the problem is that you can't format cells that are already formatted as "number" as "text" format (even if it doesn't look like they are, because they are blank). IMO, this is a bug! This is why you don't see this issue when adding columns to a new table, because the new cells don't already come with a format.
    To workaround, you can highlight the body cells after adding the new column, and delete the cells. This will "clear" the formatting, so you can then go in the inspector, format them as text, and the correct keyboard will pop up.
    Hope that helps!

  • Mapping problem with compressed key update record (target format)...

    Hi Guys,
    Getting below error while replication from Source to target. Source table is having NOT NULL Column, but on target replicat process giving error about some NULL value ??
    How to overcome this issue, any idea...
    2011-08-04 10:35:04 INFO OGG-00995 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: REPLICAT RMASTRK starting.
    2011-08-04 10:35:05 INFO OGG-00996 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: REPLICAT RMASTRK started.
    2011-08-04 10:35:06 WARNING OGG-00869 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: OCI Error ORA-01407: cannot update ("INFRA"."CUST"."CODE") to NULL (status = 1407), SQL <UPDATE "INFRA"."CUST" SET "ORD_ID" = :a2,"DP_ID" = :a3,"EXCHNG_CODE" = :a4,"ORD_QTY" = :a5,"ORD_PRICE" = :a6,"CODE" = :a7,"MKRT_CODE" = :a8,"CHANN>.
    2011-08-04 10:35:06 WARNING OGG-01004 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: Aborted grouped transaction on 'INFRA.CUST', Database error 1407 (ORA-01407: cannot update ("INFRA"."CUST"."SCRP_CODE") to NULL).
    2011-08-04 10:35:06 WARNING OGG-01003 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: Repositioning to rba 44132192 in seqno 68708.
    2011-08-04 10:35:06 *WARNING OGG-01154 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: SQL error 1407 mapping INFRA.CUST to INFRA.CUST OCI Error ORA-01407:* *cannot update ("INFRA"."CUST"."SCRP_CODE") to NULL (status = 1407), SQL <UPDATE "INFRA"."CUST" SET "ORD_ID" = :a2,"DP_ID" = :a3,"EXCHNG_CODE"=:a4,"ORD_QTY"*
    *= :a5,"ORD_PRICE" = :a6,"SCRP_CODE" = :a7,"MKRT_CODE" = :a8,"CHANN>.*
    2011-08-04 10:35:06 WARNING OGG-01003 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: Repositioning to rba 44132192 in seqno 68708.
    2011-08-04 10:35:06 ERROR OGG-01296 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: Error mapping from INFRA.CUST to INFRA.CUST.
    2011-08-04 10:35:06 ERROR OGG-01668 Oracle GoldenGate Delivery for Oracle, rmastrk.prm: PROCESS ABENDING.
    Oracle GoldenGate Delivery for Oracle process started, group RMASTRK discard file opened: 2011-08-04 10:35:05
    Current time: 2011-08-04 10:35:06
    Discarded record from action ABEND on error 1407
    OCI Error ORA-01407: cannot update ("INFRA"."CUST"."SCRP_CODE") to NULL
    (status = 1407), SQL <UPDATE "INFRA"."CUST" SET "ORD_ID" = :a2,"MKRT_CODE" = :a8,"CHANN>
    Aborting transaction on ./dirdat/pm beginning at seqno 68708 rba 44132192
    error at seqno 68708 rba 44132192
    Problem replicating INFRA.CUST to INFRA.CUST
    *Mapping problem with compressed key update record (target format)...*
    ORD_QTY = 500
    ORD_PRICE = 37430
    SCRP_CODE =
    MKRT_CODE = N
    Oracle GoldenGate Delivery for Oracle process started, group RMASTRK discard file opened: 2011-08-
    04 10:35:05
    Current time: 2011-08-04 10:35:06
    Discarded record from action ABEND on error 1407
    OCI Error ORA-01407: cannot update ("INFRA"."CUST"."SCRP_CODE") to NULL
    (status = 1407), SQL <UPDATE "INFRA"."CUST" SET "ORD_ID" = :a2,"MKRT_CODE" = :a8,"CHANN>
    Aborting transaction on ./dirdat/pm beginning at seqno 68708 rba 44132192
    error at seqno 68708 rba 44132192
    Problem replicating INFRA.CUST to INFRA.CUST
    Mapping problem with compressed key update record (target format)...
    ORD_QTY = 500
    ORD_PRICE = 37430
    SCRP_CODE =
    MKRT_CODE = N
    Any inputs / help would be appreciated.
    Regards,
    Manish

    The SCRP_CODE column has a NOT NULL constraint. The ORA-01407 error is telling you that you cannot update or set a value for this column to null because of the constraint. This has absolutely nothing to do with an index. You can use a marker/sentinel value in lieu of using NULL. For a numeric field, where everything is positive, a negative value (-1) can be decoded as meaning null. For a character field, a code such as NA can represent NULL.
    This also has nothing to do (directly) with GoldenGate failing because of this error. The underlying SQL statement will fail everywhere, regardless of the tool or application. It is not a case of failing only in GoldenGate.

  • Two forms that update differrent tables on the same page?

    I tried to add two forms that update different tables on to one page.
    Problem is when I do that the forms gives me an error saying the field does not exist. It's like it is trying to update one table with the other tables fields.
    As an example Say I have one forms that is for people table and another one that is the Jobs table.
    When I go to update the people table, it sends the data for the jobs fields too I get an error like the field job description does not exist.
    I have two different forms for these and everything.
    I would hope it is possible to have two forms that update different tables on the same page.

    I was trying the exact same thing, but i managed to work round it by setting the steps to hide one region, so the user would enter the form see one region submit the region then direct back to the same page with the different region visible and the original hidden.
    I don't know if this would be acceptable for you...

  • Single form to update multiple tables

    Hi,
    I have a strange request but I hope it makes sense.
    I have to create a front end to maintain roughly a 100 tables, this will increase to about 200 in the future. I have no control over the table structure so this is what I am stuck with.
    I could create a tabular form for each table but this would mean that each new table that comes on line I would have to add another page
    So rather than doing this what I thought was having one dynamic tabular form where the column headings would come from the table / column headings and the form get / update would be dynamically created. One problem I cant guarantee the tables will have the same number of columns.
    So the user from a drop down list could select a table name and that table will be displayed in a tabular report, they select another table from the drop down list and that table is displayed on the same page.
    That way there would be only one form and I could add a page where the users could add additional tables to be used by the app as they become available
    Is this possible using apex?? Has anyone done anything similar before and if so are there any pointers or examples they could give me.
    Hope this makes sense
    Thanks in advance

    Hi,
    Thanks for this, it is what I'm after and part from the add row functionality I think I have a working version.
    The next thing I have to do is make it work with tables with different numbers of rows, do you have any tips or hints on how best I can achieve this??

  • Excel tables... columns and row formatting after I update the indesign page

    When my excel table gets updated in indesign I lose formatting (hight/wide) for the columns&rows. There are 26 columns and each one is a difference size. Do I have to formatting (hight&wide) each column and row every time the excel table is updated?

    We have many publications with statistical tables, which are done in excel. We want to try to do some publications with only tables and do it in-house. The problem is when we place the table in indesign and finish formatting the table. We will get a updated table that needs to be updated in indesign. But when we do we update we lose all of the indesign formatting. Fixing the fonts, type size, etc is easy but how do we get back the all column widths.

  • Updating table w/c is not part of the block in the form

    Greetings!!!
    I have a problem in updating table that is not part of a form's block.
    This is the scenario:
    Table Number 1(block in the FORM):
    TABLE_A
    A_ID NUMBER
    A_VALUE VARCHAR2(1)
    PRIMARY KEY IS A_ID
    Table Number 2(Not included in the form's block and have records on it):
    TABLE_B
    B_ID NUMBER,
    FLAG_VALUE VARCHAR2(1)
    PRIMARY KEY IS B_ID
    Table Number1(TABLE_A) is block in the FORM and there's a trigger PRE-UPDATE on it.
    The code is:
    Update TABLE_B
    SET FLAG_VALUE:='T'
    WHERE TABLE_B.B_ID NUMBER= :TABLE_A.A_ID NUMBER;
    After adding new record in the form and the new value of A_ID is in
    B_ID, the old value of FLAG_VALUE is not changed to 'T'.
    CAn anybody explain to me if what's wrong...
    Tnx in advance...
    Regards,
    BF

    If it's a new record, PRE-UPDATE won't fire, PRE-INSERT will. Put the code in a Program Unit and call from both triggers.

  • Using a single Form to Update two tables.

    I would like some assistance please?
    I have an "<strong>Event</strong>" ,"<strong>Item</strong>" and "<strong>Item allocation</strong>" tables . The "Item_allocation" table serves as a composite table joining the "Item " and "Event" table. The relationships are as follows (*1*)Event :(*M*)Item and vice versa. * hence the reason for the third table.
    Attributes are as follows.
    <u>Event</u>
    Eventid(pk)
    Eventname
    Eventdate
    <u>Item</u>
    Itemid(pk)
    Itemname
    Itemcost
    Itemallocation_
    Item_allocationid(pk)
    Eventid(fk)
    Itemid(fk)
    <strong><u>What I'm essentially trying to achieve here is , allow the user to book and event and as part of that process be able to select multiple items.. I need the both "Event " and "Item_allocation" tables to be updated.</u></strong>
    Thank you in advance.

    Hi,
    Try creating the form based on a view and use an INSTEAD OF trigger to create the records in the two tables. Here's an example of this: Report & form on Multiple table
    Andy

  • I have a problem when update tables with a database link (APEX)

    Hi, I search answers for my problem and I not found a solution. My problem start when I open page with database link statement in APEX. I drop tables and execute this for update the tables in APEX.
    EXECUTE IMMEDIATE 'CREATE TABLE XXXXXXX
    AS
    SELECT A1,A2,A3
    FROM AAA@BBB';
    I use Mozilla Firefox and isn't always updated the tables because it shows dialog for downloading file "f". I rename the file to txt and I see the text "IBMPC/WIN_NT-8.1.0"...
    In the explorer always show a window only the text "IBMPC/WIN_NT-8.1.0"...
    What is the solution for my problem? I need update this tables.
    Thanks. John.

    It's easy. It doesn't work a database link, on apex, with a pl/sql code or store procedure.
    I saw that many people had the same problem but I don't see a solution.
    As I put up, I want to remove my tables on APEX and copy the table of my Oracle database with the update dates.
    The posts are from the same problem as my English is very bad, it got to help explain the problem.
    I have a page with a pl/sql code. This code in Oracle is correctly.
    For example, with this code I update the table PRUEBAS with the data of TABLEX.
    BEGIN
    BEGIN
    EXECUTE IMMEDIATE 'DROP TABLE "PRUEBAS"';
    EXCEPTION WHEN OTHERS THEN NULL;
    END;
    EXECUTE IMMEDIATE 'CREATE TABLE "PRUEBAS"
    AS
    SELECT AAA,
    BBB,
    CCC
    FROM TABLEX';
    END;
    But, in this code, I have the problem.
    BEGIN
    BEGIN
    EXECUTE IMMEDIATE 'DROP TABLE "PRUEBAS"';
    EXCEPTION WHEN OTHERS THEN NULL;
    END;
    EXECUTE IMMEDIATE 'CREATE TABLE "PRUEBAS"
    AS
    SELECT AAA,
    BBB,
    CCC
    FROM TABLEX@DB_LINK';
    END;
    I sometimes get an error. Sometimes it works fine, but half of the tries Apex returns "IBMPC/WIN_NT-8.1.0" in the browser and I am not using an IBM PC or Win NT...
    And i read that In the alert_xe.log file there are a error of core dump... ... :S or that the application return corrupt headers.... Is a problem of versions?
    I used a synonym and I have the same problem.      
    Even if I run the code on SQL COMMANDS (SQL WORKSHOP) it shows dialog for downloading file "f". I rename the file to txt and I see the text "IBMPC/WIN_NT-8.1.0"...
    The problem is in Mozilla Firefox and in IE.
    I have the OracleXE 10g (Application Express 3.0.1.00.08).
    And the question is.. ... ... ... ... What is the solution? :)
    Thanks.
    John.

  • Problems in WEB Dynpro The Table doesnt update

    Hi everyone, I did an WEB Dynpro Project and I created a table, and I wanna to fill that table  in the event doinit but it didnt update
    this is my code into a Controller methond
    public void llenaTabla( )
    IPublicVisualizarContrato.IProductDataElement prd = null;
        for(int i=0;i<5;i++)
          prd = wdContext.nodeProductData().createProductDataElement();
          prd.setProveedor("Provedor_"+i);
          prd.setAbasto("Abasto_"+i);
          prd.setAnual("Anual_"+i);
          prd.setConsigna("Consig_"+i);
          prd.setDistribucion("Dist_"+i);
          prd.setTemporada("Temp_"+i);
          prd.setPostVenta("PostV_"+i);
          prd.setNoVendible("NV"+i);
           wdContext.nodeProductData().addElement(prd);
    And I called this method in Another view in methos doinit()
    public void wdDoInit()
        //@@begin wdDoInit()
         wdThis.wdGetVisualizarContratoController().llenaTabla();
         //wdThis.wdFirePlugOutput();
        //@@end
    after deploying the table is empty
    Someone Could you tell what is the problem, thank you very much

    Hi Nitesh
    Thak you for your help, I solved that detail, but I have a problem some colums of the table are linktoaction, my question is how can I pass a value to the action whe the user click on this image , thank you very much
    Atte Israel

  • Problems with Submitting a Adobe Livecycle Designer 8.0 created Form after Update to Adobe Prof. 8.1

    Hi folks,
    can someone tell me, which problem is it? Forms created in Livecycle Designer 8.0 with Adobe Prof. 8.0 don't have problem with submitting, but with Adobe Prof. 8.1.
    Thanks for help or information in adv!

    Hello Mr Aandi Inston,
    thanks for your quick answer! My problem is the following: The functionality email submitting in Livecycle 8.0 created form under Adobe Prof. 8.1 is malfunction when you open the form in Adobe Reader 8.x. There are non error messages to able to locate the problem. When you click the submit button, nothing is happen. Forms created before update adobe prof. 8.0 to 8.1 didn't have problem like this.
    Normally, after clicking submit button ms outlook popup with suitable subject, attachment and so on. Executing the form in Adobe Prof. you wont have problem to submit form per email. Now I suppose that this problem is caused by updating???
    Why do I claim it? After failed testing the modified form based on dynamic interactive template form "Purchase Order.pdf" from Designer 8.0 under different windows os and ms office versions I tried to test the above-named template, the same problem you will get: email submitting is malfunction!
    I hope, my description will be detailed enough to you and I'm glad to hearing from you soon!

  • Problem commiting form on table

    Dear forum members,
    Strange things happen:
    I have a form on a table which worked fine. so far. Since yesterday - I changed a lot ;-) - the following does not work anymore:
    - There is a button giving a request (NEW_POS)
    - If the user is pressing the button the form should
    1. save its content by doing a Automatic Row Processing (DML) - Update (When Button Pressed (Process After Submit When this Button is Pressed): NEW_POS_BUTTON)
    2. performing a PL/SQL operation.
    But since yesterday the commit does'n work anymore. I added Process Success/Error Messages. And it tells me always success, but all changed fileds of the form are not saved.
    Turning the debug to on doesn't help me much. Do you have any idea where to look for a failure?
    Best regards,
    Johann

    Dan,
    Yes I receive both of the success messages.
    And yes i'm sure that the item that holds the primary key value is populated when the page is submitted...
    And I tried both: An extra update only process and the common "Process Row" Process (insert, update and delete)...
    Strage is that if I send a SAVE request, the commit is done, in the other case it isn't. But the success message is still there.
    Sorry that I don't put this form onto apex.oracle.com, because it is extremly complicated, containing tabular subforms, etc.
    But the PL/SQL process does this:
    DECLARE
      RETURN_VALUE  NUMBER DEFAULT 0;
    BEGIN
      RETURN_VALUE:=IV_CREATE_NEW_CQIR_ITEM(
        IN_CQIR_PK => :P320_CQIR_PK,
        IN_NO => TO_NUMBER(:P320_NEW_POS_NO),
        IN_POSITION => TO_CLOB(:P320_NEW_POS_POSITION),
        IN_AMOUNT => TO_NUMBER(:P320_NEW_POS_AMOUNT),
        IN_AMOUNT_TYPE => :P320_NEW_POS_ME,
        IN_PRICE_INT => TO_NUMBER(:P320_NEW_POS_PRICE_INT),
        IN_PRICE_EXT => TO_NUMBER(:P320_NEW_POS_PRICE_EXT),
        IN_SPECIFICATION => :P320_NEW_POS_SPECIFICATION,
        IN_TAX => TO_NUMBER(:P320_NEW_POS_TAX) ,
        IN_INFO =>:P320_NEW_POS_INFO);
      :P320_NEW_POS_NO:=NULL;
      :P320_NEW_POS_NO:=NULL;
      :P320_NEW_POS_POSITION:=NULL;
      :P320_NEW_POS_AMOUNT:=NULL;
      :P320_NEW_POS_ME:=NULL;
      :P320_NEW_POS_PRICE_INT:=NULL;
      :P320_NEW_POS_PRICE_EXT:=NULL;
      :P320_NEW_POS_SPECIFICATION:=NULL;
      :P320_NEW_POS_TAX:='20';
      :P320_NEW_POS_INFO:=NULL;
    END;IV_CREATE_NEW_CQIR_ITEM inserts one row to a tabluar subform...
    Best regards
    Johann

  • Update table problem

    Hello,
    I want to update table building_test from table buildings if name is null or if county_id or region_id is null or -1
    The below query works fine if my building_test table contains null values. if I add a test value with region or county -1, I get the error below.
    Note: table building are in a remote DB. I just make it simple to post it to the forum.
    Tha datatypes of the tables are OK.
    Oracle is 9i
    BEGIN
    FOR i IN (
    SELECT building_id, name, county_id, region_id
    FROM buildings
    WHERE building_id IN (SELECT building_id
    FROM building_test
    WHERE name IS NULL
    OR county_id IS NULL
    OR region_id IS NULL
    OR county_id = '-1'
    OR region_id = '-1'
    LOOP
    UPDATE building_test
    SET name = i.name
    WHERE building_id = i.building_id
    AND name IS NULL;
    UPDATE building_test
    SET county_id = i.county_id
    WHERE building_id = i.building_id
    AND county_id IS NULL
    OR county_id = -1;
    UPDATE building_test
    SET region_id = i.region_id
    WHERE building_id = i.building_id
    AND region_id IS NULL
    OR region_id = -1;
    END LOOP;
    END;
    Error starting at line 5 in command:
    Error report:
    ORA-01401: inserted value too large for column
    ORA-06512: at line 17
    01401. 00000 - "inserted value too large for column"
    *Cause:   
    *Action:
    Any help will be much appreciated.
    Thank you.

    it's not always clear, what AND and OR combinations really do:
    WHERE building_id = i.building_id
    AND county_id IS NULL
    OR county_id = -1;can mean
    WHERE (building_id = i.building_id AND county_id IS NULL) OR county_id IS NULL 
    *OR*
    WHERE building_id = i.building_id AND (county_id IS NULL OR county_id IS NULL)try with brackets and post the result.

  • Can insert but cannot update table.

    Hi,
    I am finding trouble in something that I thought would be very easy. I have writen some code that simply updates some rows in one table (update table set column = value where critery; commit;). This table isn't associated to any Forms block. The code is properly executed except for forms 40401 exception, but I have dealt with it by changing the message level, as it was suggested in this forum.
    My problem is that in spite of getting no error the table isn't updated. I find this pretty weird. I thought it might be some problem related with database permissions, but the same command launched on PL/SQL Developer under the same database connection works fine. I have also checked that insert statement over the same table works properly.
    Do you have any idea?
    Thanks.

    Hi,
    Thank you very much for your replies. I finally managed to solve the issue and I must apologize for having posted this thread. After all, it was quite an easy solution, as I suspected. A data format question. In Spain, decimal numbers are written with comma - ',' and the data I was trying to update always consisted of numbers. These numbers were coming from character variables, and the problem was behind the types conversion. Things worked properly if I wrote UPDATE BUQUES B SET B.B_ESLORATOTAL=TO_NUMBER('12,23'), but they didn't when I used a variable p_Valor where '12,23' value was stored. So was done in my Forms procedure and it seems it was crashing although I didn't get any error.
    I finally managed solved the issue by using FORMS_DDL command and building up the update statement in a string. As soon as I checked what I was storing in this string I noticed the mistake.
    Again, thank you very much for your time.
    Regards,
    Fernando

Maybe you are looking for