Update one column in Query only block

Hi,
I have a question regarding multi-record, multi-columns form block.
A block has 100 columns (column1 to column100).
We have two separate version of same form. In query only mode, update_allowed property of all the blocks in the form is False.
But in query only form, one specifc column should be updateable.
How can use Custom.pll to achive this functionality ?
I tried following steps
1. In when-new-item instance of column 54, wrote set_item_property and set_block_property
2. Update allowed for block and specific item is True
I know that Block property will override the property of items.
Now all the items are updateable in query only form. But i want only one column updateable.
Appreciate you valuable input on this.
Thanks

This is an eBusiness-related question, you should post it in the eBusiness-forum. From the "pure" forms point of view, set the Block as updateable and set all item except the one you want to be updateable to UPDATE_ALLOWED =PROPERTY_FALSE

Similar Messages

  • Update a single column in query only form

    Forms 9i, database 10g
    I am migrating the form from 6i to 9i. I have a form that is query only except for one field that can be updated. The main block1, based on a view, includes most of the person's personal data, none of which is updateable.. Another block2, based on a table, includes the 3 not-null colums that cannot be updated, and a remarks field, which can be updated. The block2 properties are set YES for insert, update, delete. The three non-updatable columns have properties set to NO for I,U and D, but the remarks column has I,U and D properties set to YES. When I enter data into the remarks field and press the Save on the Forms icon bar, I get error FRM-40508:unable to insert record and the ORA-00001:unique constraint. I don't should not be able insert and I don't want to, I just want to update one column.
    What am I not setting correctly in 9i? The same triggers and code works in 6i.
    Any suggestions are greatly appreciated.
    Vija

    No, there are no on-update triggers, but there are Post-Qry. I did run it in debug mode, but there is no good place to put a break point, since retrieval of the data works fine. Should I have key-commit trigger on the block to do the update?
    Vija

  • SQL update one column from another column

    I'm looking for a way to update a SQL column with a portion
    of info from another column in the same table.
    example of a sql command
    UPDATE table1
    SET table1.columnname1 = table1.columnname2
    FROM table
    WHERE blah blah blah
    Here's the thing... I only need a portion of the data found
    in the source column. I'm not sure how I would do this then.
    for example, the database has countries and states combined
    into one column like this 'US-DC', 'US-CA', US-FL', etc. I want to
    separate these into two columns, a country column and a state
    column.... and I dont want to go though all the results and do this
    line by line. How would I write the SQL command so that it puts
    just the country in the country column, and puts just the state in
    the state column, and it omits the dash all together.
    any ideas?

    It depends. Are you using PHP and mySQL or ASP and SQL?
    If you are using mysql and PHP you could use the following
    code to loop through all records in your datatbase.
    $sql="SELECT * FROM tablename"; //SET tablename to the name
    of your database table.
    $result=mysql_query($sql)or die(mysql_error(). " - $sql");
    for($x = 0; $row=mysql_fetch_assoc($result); $x++){
    //set up the variables from the table
    $ID=$row['ID']; //this is the primary key
    $var1=$row['contrystatecolumn']; //this is the name of the
    column which holds the country-state
    $var2=explode("-", $var1); //now we explode the string to get
    the country and the state seperated and place the results into an
    array
    $country=$var2[0]; //this is the first piece of the exploded
    string in the array
    $state=$var2[1]; //this is the second piece of the exploded
    string in the array
    //now we update the database record with the new information
    //remember to replace the tablename with your actual table
    name and the columns country and state with the acutal names of
    your columns in your table
    $sql2="UPDATE tablename SET country='$country'.
    state='$state' WHERE ID='$ID'";
    $result2=mysql_query($sql2)or die(mysql_error() . " -
    $sql2");
    This code will loop through every record in your table and do
    what you want very quickly.
    Hope this helps
    Stan Forrest
    Senior Web Developer
    ATG Internet

  • UPDATE of column in parent only UPDATEs first row in DENORMALIZED child table

    In the Repositiry in Designer 6i, I denormalized DESC1 column to
    pull the value of DESC1 in the parent table. The child table has
    four (4) records with matching foreign keys. When I go into my
    Form and update DESC1 in the parent, only the first of the four
    child DESC1's are updated. Any ideas?
    Thanks,
    Dan

    Dan,
    Sorry, known bug, but should be fixed in next release.
    Have a look via metalink at article <Note:156833.1> this
    explains in detail the problem and a fix.
    The bug no was <1974122>
    regards
    David

  • Update one column while getting the value in another column

    Is it possible to in one single SQL statement update two columns in a table while at the same time obtaining the value of another column, on the same row, in the same table, and independently (that is, the update of the columns has nothing to do with the data that I want from another column)*?* Of course, I can do this in two operations, one being a "select" and the other one being an "update", but since I am in the same table and even on the same row, is it really necessary to make TWO database calls? That's why I want to combine the the two SQL-statements, for reasons of presumed effiency.

    jsun wrote:
    Is it possible to in one single SQL statement update two columns in a table while at the same time obtaining the value of another column, on the same row, in the same table, and independently (that is, the update of the columns has nothing to do with the data that I want from another column)*?* Of course, I can do this in two operations, one being a "select" and the other one being an "update", but since I am in the same table and even on the same row, is it really necessary to make TWO database calls? That's why I want to combine the the two SQL-statements, for reasons of presumed effiency.Two statements != two database calls.
    At least not in terms of SQL.
    JDBC requires a 'statement' but in SQL (depending on the data source) that can include multiple statements. An obvious example of this is a stored proc but there are other ways as well.

  • Need to update one column of all table in that particular schema

    hi all,
    i am using db10g.
    my task is to update one particular column's value of all the table in that schema.
    to acheive the above
    do i have to write update statement for each table or is there any way to do it in bulk?
    i hope my question make sense.
    Thanks..

    Hi karthick,
    I want to know something which is not related to this thread .
    How to include formatted post while replying to thread .
    I know using will be used  format  code before posting  . But how can we  do  it for posted message .
    I hope you understand my question .
    Thanks in advance .                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Update one column in different conditions

    Is there any way by which I can merge following two update statements into a single statement without using plsql. Here the same column of one table is being updated in different conditions.
    UPDATE week_table
    SET present_week=NULL
    WHERE week_table.pay_statusk=(
                        SELECT value
                        FROM panel
                        WHERE pname='PRESENT_WEEK')
    UPDATE week_table
    SET present_week='Y'
    WHERE week_table.pay_status=(
                        SELECT value+1
                        FROM panel
                        WHERE pname='PRESENT_WEEK')
    --waiting for a solution, thanks in advance.
    null

    Or like...
    SQL> select * from week_table;
    PRESENT_WE PAY_STATUS                                                          
    X                   1                                                          
    X                   2                                                          
    SQL> select * from panel;
    PNAME                     VALUE                                                
    PRESENT_WEEK                  1                                                
    SQL> UPDATE week_table
      2  set present_week = decode(pay_status,(select value
      3                                       from panel
      4                                       where pname = 'PRESENT_WEEK'),null,
      5                                      (select value+1
      6                                      from panel
      7                                      where pname = 'PRESENT_WEEK'),'Y')
      8  WHERE week_table.pay_status=(
      9                        SELECT value+1
    10                        FROM panel
    11                        WHERE pname='PRESENT_WEEK')
    12  or
    13   week_table.pay_status=(
    14                       SELECT value
    15                        FROM panel
    16                        WHERE pname='PRESENT_WEEK');
    2 rows updated.
    SQL> select * from week_table;
    PRESENT_WE PAY_STATUS                                                          
                        1                                                          
    Y                   2                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Need  trigger when update one column then record sysdate on another collumn

    Hi
    Gurus
    I have a table called RTV_PLAN
    And it have two columns,
    FORCE_KEYIN_FLAG VARCHAR(2)
    FORCE_KEYIN_DATE DATE
    I want when FORCE_KEYIN_FLAG get a value
    Then FORCE_KEYIN_DATE record the sysdate
    Please kindly give some help
    Many thanks
    saven

    Hi
    Justin
    thank you!
    It works for me very well.
    I use this code before
    <div class="jive-message-body"><div class="jive-quote"><span class="jive-quote-header"> if updating then
    </div>
    with your help my code is below now,
    <div class="jive-message-body"><div class="jive-quote"><span class="jive-quote-header">
    create or replace TRIGGER "RTV_PLAN_TRIG"
    before insert or update on RTV_PLAN
    for each row
    declare
    SCRAP_flag rtv_plan.SCRAP_flag%TYPE;
    force_keyin_flag rtv_plan.force_keyin_flag%TYPE;
    begin
    if inserting then
    if :NEW.RTV_PLAN_KEY is null then
    :NEW.RTV_PLAN_KEY := SAVEN.RTV_PLAN_api.RTV_gen_pk;
    end if;
    :NEW.dc_receive_date := sysdate;
    end if;
    if ( :new.scrap_flag IS NOT NULL ) then
    :NEW.SCRAP_date := sysdate;
    :NEW.SCRAP_USER := nvl(v('APP_USER'),USER);
    end if;
    if ( :new.force_keyin_flag IS NOT NULL )
    then
    :NEW.FORCE_KEYIN_date := sysdate;
    :NEW.FORCE_KEYIN_USER := nvl(v('APP_USER'),USER);
    end if;
    end;
    </div>
    can you checking this whether they have other error ?
    thank you
    saven

  • Update one column from another

    Hi guys,
    I have two columns in a table, FIRSTNAME and LASTNAME. Currently, both firstname and lastname are appearing in 'Firstname' column. I would like to split the last name from this column and insert into the 'LASTNAME' column.
    For example, here's what I have currently:
    Line: -----
    Firstname     Lastname
    Peter Andre     
    James Dean     
    Watch Man     
    Jenna Klare     
    James Smith     
    Tina Adams     
    Blair Witch     
    Currently, my 'Lastname' column is empty. I would like to update the table to insert lastname from the 'FIRSTNAME' field into 'LASTNAME' column, so the output will look like:
    Firstname     Lastname
    Peter     Andre
    James     Dean
    Watch     Man
    Jenna     Klare
    James     Smith
    Tina     Adams
    Blair      Witch
    Please help.
    Thanks in advance.

    Hi,
    maybe this,
    SQL> with t As(Select 'Peter Andre' Name From Dual union all
      2            Select 'James Dean' Name From Dual union all
      3            Select 'Watch Man' Name From Dual union all
      4            Select 'Jenna Klare' Name From Dual union all
      5            Select 'James Smith' Name From Dual union all
      6            Select 'Tina Adams' Name From Dual union all
      7            Select 'Blair Witch' Name From Dual)
      8  SELECT regexp_substr(Name,'[^ ,]+' ) First
      9       , regexp_substr(Name,'[^ ,]+$') LastName
    10    FROM t;
    FIRST                                        LASTNAME
    Peter                                        Andre
    James                                        Dean
    Watch                                        Man
    Jenna                                        Klare
    James                                        Smith
    Tina                                         Adams
    Blair                                        Witch
    7 rows selectedor
    SQL> with t As(Select 'Peter Andre' Name From Dual union all
      2            Select 'James Dean' Name From Dual union all
      3            Select 'Watch Man' Name From Dual union all
      4            Select 'Jenna Klare' Name From Dual union all
      5            Select 'James Smith' Name From Dual union all
      6            Select 'Tina Adams' Name From Dual union all
      7            Select 'Blair Witch' Name From Dual)
      8  SELECT Substr(Name,1,Instr(Name,' ',1)-1) First
      9       , Substr(Name,  Instr(Name,' ',1)+1) LastName
    10    FROM t;
    FIRST                                        LASTNAME
    Peter                                        Andre
    James                                        Dean
    Watch                                        Man
    Jenna                                        Klare
    James                                        Smith
    Tina                                         Adams
    Blair                                        Witch
    7 rows selectedRegards,
    Christian Balz
    Edited by: Christian Balz on 17/06/2009 15:33

  • Triggers to update one column on 3 tables

    hi,
    I've three tables:
    TABLE TN:
    COD_ID.........VARCHAR2(32) primary key
    NAME...........VARCHAR2(64) NOT NULL
    COD_ID..............NAME
    A12.................AT32
    A13.................AT33
    A14.................AT35
    A30.................AT32
    TABLE TM:
    ID_X..........VARCHAR2(32) PRIMARY KEY
    NAME..........VARCHAR2(64)
    ID_X..............NAME
    A12
    A13
    A14
    A30
    TABLE TL:
    COD_ID..........VARCHAR2(32) FOREIGN KEY ON TN
    ID_X............VARCHAR2(32) FOREIGN KEY ON TM
    TL_ID...........VARCHAR2(32) PRIMARY KEY
    NAME............VARCHAR2(64)
    I'd like to create triggers (or procedure) that update automatically the value NAME in the tables TM and TL.
    for example:
    If I insert into TN a new COD_ID (A39) and a new NAME (AT38), when I insert a new ID_X in tble TM, I'd like
    to have the value AT38 in NAME of TM, and when I insert a new record in table TL I'd like
    to have the value AT38 in NAME of TL.
    Also when I update NAME of TN.
    I tried with these triggers:
    CREATE OR REPLACE TRIGGER TN_PR_BEFORE_UPD
    BEFORE UPDATE OF NAME ON TL
    FOR EACH ROW
    DECLARE
    tmpVar NUMBER;
    BEGIN
    update TL set NAME=:new.NAME where TL.COD_id=:new.COD_id;
    UPDATE TM SET NAME=:NEW.NAME WHERE ID_X=:NEW.COD_ID;
    END TN_PR_BEFORE_UPD;
    CREATE OR REPLACE TRIGGER TN_COD_ID
    BEFORE UPDATE OF COD_ID ON TL
    FOR EACH ROW
    BEGIN
    SELECT NAME INTO :NEW.NAME FROM TN WHERE TN.COD_ID=:NEW.COD_ID;
    END TN_COD_ID;
    CREATE OR REPLACE TRIGGER TL_pr
    BEFORE UPDATE OF NAME ON TL
    BEGIN
    UPDATE TM SET NAME=:NEW.NAME WHERE ID_X=:NEW.ID_X AND :NEW.ID_X IS NOT NULL;
    END TL_pr;
    CREATE OR REPLACE TRIGGER TL_PR_BEFORE_INSERT
    before INSERT ON TL
    FOR EACH ROW
    DECLARE
    tmpVar varchar2(64);
    BEGIN
    SELECT NAME
    into tmpVar
    FROM TN
    WHERE COD_ID=:NEW.COD_ID;
    END TL_PR_BEFORE_INSERT;
    when I update TN triggers run CORRECTLY but when I insert a new record in TM, TN, TL I don't see a new NAME.
    What I wrong??
    Thanks
    Raf

    Use when updating then insert into table_name
    and
    when inserting then insert into table_name
    clauses in your Triggers to do this

  • Updating a column of a table

    Hi all
    I have a problem in updating one column in the target table(say table A) from a column in the source table (say table B).
    All the columns in table A has been populated. Just one column should be populated. My source is a SQL object that contains a complex sql query that returns three columns date_from, date_to and ID.
    In the table A, I have the same date_from and date_to and need to get the ID from the SQL object and set it to the corresponding ID in the table A.
    I tried many ways to update the table, but it I couldn't ;(
    I should read from a table and update it based on a look-up function mapped to the column I need to update.
    I want to map the ID colmn from table A to a look-up ext function that can get the column from the table B. However I don't know how to use the Data Services objects to just update 1 column. If you could give me a consequence of the DS objects to be update a table based on a look-up , I would be so grateful.
    Thanks.

    Your dataflow should look like this :
    1) Source = the SQL transform with date_from, date_to and ID as columns.
    2) Next add a query (copy all columns from schema in to schema out) and set date_from and date_to as keys. Also make sure column names exactly match the column names in your target table, if not rename them in this query.
    3) Add a Map_Operation transform that maps all "normal" operation codes to "update"
    4) Finally add your target table and in the properties/options set "use input keys" to yes (or checked).
    This will generate UPDATE statements for all columns used in the query with a WHERE clause based on the keys defined in the query (date_from, date_to).
    Ben.

  • Can i update more then one column using select query.

    Dear All,
    Can i update more then one column of target table A from source table B. Like
    Update table A set A.A1 = (Select B.B1 from B where A.A3 = B.B3).
    Above stmt. I am updating only one column. But I want to update more then one column A.A1 and A.A2
    Plz give me the possible ways.
    Thanks,
    Vikas

    Yes you can do. Try the below Query
    Update A set (A.A1,A.A2) = (Select B.B1,B.B2 from B where A.A3 = B.B3)

  • Access for update only one column in table?

    Hi all,
    My need is to grant access for update only one column c1 in table t1.
    I guess I should use view, could you please give me some example? Maybe other ideas?

    Hi,
    You can grant privileges on individual columns.
    GRANT   UPDATE (c1)
    ON      t1
    TO      grantee_name;Look up GRANT in the SQL language manual. Annoyingly, in recent editions of the manual, GRANT is not indexed, but it's in alphabetic order with all the other statements:
    http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_9013.htm#i2155015

  • Update SAME column name in two tables from ONE query

    Dear All Seniors
    Please tell me is it possible to update a same column name in two tables.
    I have two tables in same schema
    (1)table name
    pem.igp_parent
    column name
    igp_no.
    igp_type
    (2)table name
    pem.igp_child
    column name
    igp_no.
    igp_type
    i want to update igp_no column in one query please tell me how it would be possible.
    thanks
    yassen

    You want to update the data from what to what? Where is the new data coming from?
    If you are trying to put the same data in two different tables, that strongly implies that you have a normalization problem that needs to be addressed.
    Why do you want a single query rather than updating each table in turn? Can you join the two target tables to produce a key-preserved view?
    Justin

  • What property/preference sets block property "Update changed columns only"

    Hi, we are wondering how Designer (latest version 10.1.2.4) desides when it generates a form with block property "Update changed columns only" set to Yes.
    Under some cricumstances this property is No in the generated .fmb
    We checked the object library, but the .olb has this property set to No, so Designer overrules it.
    Our goal is to generate all blocks with the "Update changed columsn only" set to No, because we ran in a forms bug that it can't handle Insert statements on blocks with this property set to Yes (ORA-01036). This bug only occurs in the latest forms version 10.1.2.3
    Hope anyone can help to force this property to be No when we want to achieve 100% generation from Designer.
    Kind Regards
    Auke Quist
    Edited by: aukequist on Oct 13, 2008 8:49 PM

    I think that's not possible in designer. You could define a block with this property set in the template form or in the object library. The use this block use the template/library object property in designer.
    Regards Erik

Maybe you are looking for

  • How to update condition value using e1edp05 segment during order creation

    Hi, I have a requirement where I need to update the item level condition value (komv-kbeter)  to the condition type (komv-kschl) from the incoming idocs (orders05). But  the same is configured  in such a way to populate automatically with the default

  • Purchased song but player won't play it

    Hello everyone, i purchased a song on the i-tunes store. My problem now, my player wont play it, i also transferred it onto my i phone- same problem....????HELP please!

  • How do i get app w/o using credit card?

    I would like to know how to get apps without using a credit card.  I do not use credit cards on mobile devices and I wouldn't want to charge $0.99. Can they be billed to your phone bill some how or some other thing set up?

  • How to deployed jsp report to Oracle EBS R12

    Hi, The jsp report deploy using Oracle Report. How to deploy the jsp report to Oracle EBS R12 and calling jsp report through Self-Service Menu. Thank you. Wilson

  • How to Reverse COPA line item

    Hi, I have posted one manual line item in KE21N for COPA. There is a need to reverse this entry as it was done by mistake. Please give me some idea how to reverse this document. Thanks KB