Join condition in an update statement

All,
This is what I want to do
update table1
set col1= (col2 from table 2)
for each row.
ie. Each row should be updated with the corresponding value in table 2.
Please help.
Let me know if more explanation is required.

Why do you want to update col1 with same value again? That's what your update is doing.
If your intention is different you can tweak merge as needed.
merge into table1 t1
using (select key to match with table1 , value
from table1, table2, table3
where table1.col1=table2.col2
and table2.col2=table3.col3) t2
on (table1.?? = t2.key to match )
when matched then
update set t1.col1 = t2.value;

Similar Messages

  • JDBC adapter - update statement

    I have come to the conclusion that there is no direct connection between the select and update statement of a sender JDBC adapter, in terms of commit scope.
    According to SAP documentation:
    "The UPDATE statement must alter exactly those data records that have been selected by the SELECT statement. You can ensure this is the case by using an identical WHERE clause. (See Processing Parameters, SQL Statement for Query, and SQL Statement for Update below)."
    But my point is: if select statement retrieves e.g. 5 rows based on a where condition, then the update statement could find 6 rows to update, if a row was inserted a split second after the select, but before the update. Result : a row is lost...
    I don't think the select statement puts a lock on the table(s) it accesses, and releases this lock after update has been committed. This would ensure integrity between select and update statement.
    Can anybody confirm or deny this ?

    Hi,
    Have you seen the<b> Isolation level for Transaction handling</b> in the sender JDBC adapter?
    Make the Isolation level as Serializable and repeatable Read and the db gets locked  anbd until Update happens, no Insertion can occur in the Split Second!
    http://help.sap.com/saphelp_nw04/helpdata/en/7e/5df96381ec72468a00815dd80f8b63/content.htm
    Regards,
    Bhavesh

  • Update statement issue

    Whenever I join two tables in update statement
    following error occures ,However all columns exist
    update bio1
    set appl_uid = demdata.appl_uid
    where bio1.cnic = demdata.cnic
    ora-00904 demdataid.cnic invalid indentifier

    no dear i am at the SQLPLUS prompt and i had the access the of of both of these tables and demdata is the table and appl_uid id is the column, i am just trying to update first_table.appl_uid column with the join of 2nd tables's appl_uid column on the basis of the common field CNIC in between both of these tables, the most simplest update is not working, i am getting late from lunch, plz help
    Regards,

  • Update statement with joining other tables

    Hi ,
    I have two table one is containing xml file , basically i need to read from those xml file then update to another table based on some condition.
    UPDATE TRCB_XBRL_STG_2 STG
    SET PROFIT =
      case when xbrl.isconsolidatedacc='Y' and EXTRACTVALUE(XBRL.XBRLFILE,'//PROFIT ', 'xmlns:acra="..."') is not null
      THEN EXTRACTVALUE(XBRL.XBRLFILE,'//PROFIT ', 'xmlns:acra="..."')
      WHEN XBRL.ISCONSOLIDATEDACC='N' AND EXTRACTVALUE(XBRL.XBRLFILE,'//PROFIT ', 'xmlns:acra="..') IS NOT NULL
      THEN extractValue(XBRL.xbrlfile,'//PROFIT ', 'xmlns:acra=".."')
      ELSE STG.PROFIT
      END,
      SET REVENUE=
      case when xbrl.isconsolidatedacc='Y' and EXTRACTVALUE(XBRL.XBRLFILE,'//REVENUE', 'xmlns:acra="..."') is not null
      THEN EXTRACTVALUE(XBRL.XBRLFILE,'//REVENUE.', 'xmlns:acra="..."')
      WHEN XBRL.ISCONSOLIDATEDACC='N' AND EXTRACTVALUE(XBRL.XBRLFILE,'//REVENUE', 'xmlns:acra="..') IS NOT NULL
      THEN extractValue(XBRL.xbrlfile,'//REVENUE', 'xmlns:acra="REVENUE"')
      ELSE STG.REVENUE
      END,
      ... (around 100 columns)
    FROM  TRCB_XBRL xbrl ,TRCB_XBRL_STG_2 STG
    WHERE STG.XBRL_ID = XBRL.XBRL_ID Number of columns are around 100 , please anyone suggest how to use update statement with joining two tables.

    Hi,
    If all the values needed to update a given row of table_x are coming from the same row of table_y (or from the same row of a result set of a query involving any number of tables), then you can do something like this:
    UPDATE  table_x  x
    SET     (col1, col2, col3, ...)
    =     (
             SELECT  NVL (y.col1, x.col1)
             ,         NVL (y.col2, x.col2)
             ,         NVL (y.col3, x.col3)
             FROM    table_y  y
             WHERE   x.pkey   = y.expr
             AND         ...
    WHERE   ...
    ;If the WHERE clause depends on the same row of table_y, then it will probably be simpler and more efficient to use MERGE instead of UPDATE.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    In the case of a DML operation (such as UPDATE) the sample data should show what the tables are like before the DML, and the results will be the contents of the changed table(s) after the DML.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ {message:id=9360002}

  • Need help to write a query for Update statement with  join

    Hi there,
    The following update statement gives me error as the given table in set statement is invalid. But its the right table .
    Is the statement correct? Please help .
    update (
           select distinct(vpproadside.VEHICLE_CRED_OVERRIDE.vin)            
             from vpproadside.VEHICLE_CRED_OVERRIDE
             join vpproadside.vpp_vehicle
               on vpproadside.vpp_vehicle.vin = vpproadside.VEHICLE_CRED_OVERRIDE.vin
            where VPP_CARRIER_SEQ_NUMBER = 90
              and EXPIRY_DATE = '17-MAR-10'
       set vpproadside.VEHICLE_CRED_OVERRIDE.EXPIRY_DATE = '15-SEP-10';Edited by: Indhu Ram on Mar 12, 2010 1:00 PM
    Edited by: Indhu Ram on Mar 12, 2010 1:22 PM
    Edited by: Indhu Ram on Mar 12, 2010 2:35 PM
    Edited by: Indhu Ram on Mar 15, 2010 8:04 AM
    Edited by: Indhu Ram on Mar 15, 2010 8:06 AM
    Edited by: Indhu Ram on Mar 15, 2010 8:28 AM

    Ask Tom has very good discussion about this, if UPDATE does not work for PK issue, you can use MERGE
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:760068400346785797

  • Join in update statement

    can we use join in update statement?
    here is the query which is giving me error
    UPDATE      pol_int_name_multiple_v
    SET      PMV.client_seq_nbr_i = 1
    FROM     pol_int_name_multiple_v PMV
    JOIN      pol_int_name PIV
    ON      piv.int_name_id = pmv.int_name_id
    WHERE      piv.client_id = 5
    SQL> /
    FROM pol_int_name_multiple_v PMV
    ERROR at line 3:
    ORA-00933: SQL command not properly ended
    Message was edited by:
    aadi

    Yes, you can. The table with updateble columns must be a key preserved table. See http://download.oracle.com/docs/cd/B10501_01/appdev.920/a96590/adg03sch.htm#1044
    Example:
    SQL> CREATE TABLE A(A INTEGER PRIMARY KEY);
    Table created.
    SQL> INSERT INTO A VALUES(1);
    1 row created.
    SQL> INSERT INTO A VALUES(2);
    1 row created.
    SQL> COMMIT;
    Commit complete.
    SQL> CREATE TABLE B(
      2    A INTEGER,
      3    B INTEGER,
      4    FOREIGN KEY(A) REFERENCES A);
    Table created.
    SQL> INSERT INTO B(A, B) VALUES(1, 5);
    1 row created.
    SQL> INSERT INTO B(A, B) VALUES(2, 5);
    1 row created.
    SQL> INSERT INTO B(A, B) VALUES(2, 10);
    1 row created.
    SQL> COMMIT;
    Commit complete.
    SQL> SELECT * FROM B;
             A          B
             1          5
             2          5
             2         10
    SQL> UPDATE
      2    (
      3      SELECT B.*
      4      FROM A JOIN B ON A.A = B.A
      5      WHERE B.A = 2
      6    )
      7    SET B = 333;
    2 rows updated.
    SQL> COMMIT;
    Commit complete.
    SQL> SELECT * FROM B;
             A          B
             1          5
             2        333
             2        333Regards,
    Dima

  • Update statement with joins

    Hi all, consider the tables and data below
    CREATE TABLE table1 (id NUMBER, a NUMBER, b NUMBER) ;
    CREATE TABLE table2 (id NUMBER, c NUMBER, d NUMBER);
    INSERT INTO table1 VALUES(111,2,0);
    INSERT INTO table1 VALUES(111,1,2);
    INSERT INTO table1 VALUES(111,1,3);
    INSERT INTO table1 VALUES(222,1,3);
    INSERT INTO table2 VALUES(111,5,8);
    INSERT INTO table2 VALUES(222,6,7);
    what i want to do is write a UPDATE STATEMENT that joins the two tables BY id
    and update table1 rows. i want to include the following CASE statement
    UPDATE COLUMN a intable1 according to this logic
    case
    WHEN b >0
    THEN nvl(c,b)
    ELSE
    d
    END
    so table1 after the update should look like this
    id    a   b
    111   8   0
    111   5   2
    111   5   3
    222   6   3can somebody help write a update statement that update table1 according to case statement and joins both tables to get the values necessary? thanks

    Hooray for sample tables!
    SQL> alter table table2 add constraint table2_pk primary key (id);
    Table altered.
    SQL> update
      2     (select t1.a
      3            ,case when t1.b > 0 then nvl(t2.c, t1.b)
      4                  else t2.d
      5             end new_value
      6      from   table1 t1
      7      join   table2 t2
      8             on t1.id = t2.id
      9     )
    10  set a = new_value;
    4 rows updated.
    SQL> select * from table1;
                      ID                    A                    B
                     111                    8                    0
                     111                    5                    2
                     111                    5                    3
                     222                    6                    3

  • Update statement with inner join

    Hello everyone. I am am trying to do an update statement with an inner join. I have found several examples of SQL statements that work with Sql server and mysql but they don't work in Oracle. Does anyone know the proper way in Oracle 10G? I am trying to update all fields in one table from fields in another table.
    for example:
    UPDATE table3
    SET
    TL3.name = TL2.name,
    TL3.status = TL2.status,
    TL3.date = TL2.date
    FROM table3 TL3 JOIN table2 TL2
    ON (TL3.unique_id = TL2.unique_id);
    any help will be appreciated.

    Hi,
    You can also use MERGE, like this:
    MERGE INTO  table3     dst
    USING   (
             SELECT  unique_id
             ,         name
             ,         status
             ,         dt          -- DATE is not a good column name
             FROM    table2
         )          src
    ON     (dst.unique_id     = src.unique_id)
    WHEN MATCHED THEN UPDATE
    SET     dst.name     = src.name
    ,     dst.status     = src.status
    ,     dst.dt          = src.dt
    ;Unlike UPDATE, this lets you avoid essentially doing the same sub-query twice: once in the SET clause and then again in the WHERE clause.
    Like UPDATE, you don't acutally join the table being changed (table3 in this case) to the other table(s); that is, the FROM clause of the suib-query does not include table3.
    Riedelme is right; you'll get better response to SQL questions like this in the SQL and PL/SQL forum:
    PL/SQL

  • Update Statement Help Please

    I'm coming from the MS SQL world LOL
    and Im trying to write an update statement but in Oracle there is no INNER JOIN.
    Can you give me some advice on how to do this please?
    UPDATE employee
    SET employee.name = tmpuser.name
    FROM employee
    INNER JOIN tmpuser
    on tmpuser.emp_id = employtee.emp_id
    Thank you for you help.
    P

    Hi,
    AJR wrote:
    Frank,
    But when we are using the where condition it should update records with the matching ids. right?What your query should do is entirely up to you; I can't answer any questions about that, only you can.
    I have faced this issue earlier.
    WHERE       tmpuser.emp_id = employee.emp_idCan you explain?Not out of context. Post a complete statement.
    If this isn't directly related to user9170886's problem, then it's better to start your own thread.
    I can say a few things about UPDATE statements in general:
    The WHERE clause governs which rows will be UPDATEd. If there is no WHERE clause, all rows in the table will be UPDATEd.
    So
    UPDATE     employee
    SET     employee_name = ( <subquery> )
    ;UPDATEs every row in employee, because the UPDATE statement does not have a WHERE clause. Nothing in the sub-query can change that.
    A sub-query can reference values from its immediate parent, but a parent can't reference values from a sub-query (other than the values actually returned by the sub-query, of course).
    So
    UPDATE     employee
    SET     employee_name = ( <subquery> )
    WHERE     tmpuser.emp_id     = employee.emp_id
    ;causes an error, because there is no table called tmpuser in the main UPDATE statement. Nothing in the sub-query can change that.

  • Copy records of one table into another using Update statement

    Supposing I have 2 tables test and test1.
    Test has columns col1 and col2. and test1 has only one table col1.
    select * from test returns:
    COL1 COL2
    a
    b
    c
    d
    e
    select * from test1 returns
    COL1
    p
    q
    r
    s
    t
    Suppose i want to copy values of test1.col1 to test.col2 so tht final result of
    select * from test should be
    COL1 COL2
    a p
    b q
    c r
    d s
    e t
    I found a query in the OCP introduction book:
    update test set col2=(select col1 from test11)
    this works fine only when we have a single record in test1 table but fails otherwise.
    how can this be achieved using the update statement ?

    SQL> desc test
    Name Null? Type
    COL1 VARCHAR2(10)
    COL2 VARCHAR2(30)
    SQL> desc test1
    Name Null? Type
    COL1 VARCHAR2(10)
    SQL> insert into test values ('a','');
    1 row created.
    SQL> insert into test values ('b','');
    1 row created.
    SQL> insert into test values ('c','');
    1 row created.
    SQL> insert into test values ('d','');
    1 row created.
    SQL> insert into test1 values ('e');
    1 row created.
    SQL> insert into test1 values ('f');
    1 row created.
    SQL> insert into test1 values ('g');
    1 row created.
    SQL> insert into test1 values ('h');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> ed
    Wrote file afiedt.buf
    1 select a.col1, b.col1, a.rn from
    2 (select row_number() over (order by col1) rn, col1 from test) a,
    3 (select row_number() over (order by col1) rn, col1 from test1) b
    4* where a.rn = b.rn
    SQL> /
    COL1 COL1 RN
    a e 1
    b f 2
    c g 3
    d h 4
    SQL> ed
    Wrote file afiedt.buf
    1 update test set col1 =
    2 (
    3 select forupd from (
    4 select a.col1, b.col1 test1col, a.col1||' '||b.col1 forupd, a.rn from
    5 (select row_number() over (order by col1) rn, col1 from test) a,
    6 (select row_number() over (order by col1) rn, col1 from test1) b
    7 where a.rn = b.rn
    8* ) z where z.col1 = test.col1)
    SQL> /
    4 rows updated.
    SQL> commit;
    Commit complete.
    SQL> select * from test;
    COL1 COL2
    a e
    b f
    c g
    d h
    SQL>
    This will work only if you have the same number of lines in COL1 in both tables. If you have different number of lines, then you need to code more at join (outer, inner).
    But for complicated cases, please post sample data.
    Michael
    PS: And supossing that the values are distinct in TEST table. Else update will fail, because more rows will be retrived.
    If more values in TEST table in COL1, then you need to assign a row number on TEST also, and in WHERE of query you need to place one more join condition:
    something like:
    8* ) z where z.col1 = test.col1
    and z.rn = test.rn)
    SQL> /
    But as i said, get more specifications.
    Message was edited by:
    kjt
    Added the PS.

  • How to create view that has an update statement

    Tools: MS Management Studio SQL 2008 R2
    Code:
    Create View as Mocha
    UPDATE dbo.Cola
    SET Login_ID = Replace(PE15,RTRIM(Cast(Login_ID),'')
    UPDATE dbo.cola
    SET P4 = NullIf(P4,'')
    I would like to create a database object "View" to hand it over to a user and run the script. How I would create a a view that would accept an update statement. Are any work around to accomplish this goal

    Not quite sure what you want to achieve.
    However, if your view displays rows from a single table and each row relates to exactly one row in the source table (no aggregates, no join, no transformation) then you can update it.  The update will be executed on the table it refers to.
    If you view is more complex, contains joins, aggregates and such, you can create a trigger on it to update the base table(s).
    The conditions for a view to be updatable are a little more complex then what I wrote but you can find it here under "updatable view":
    http://msdn.microsoft.com/en-CA/library/ms187956.aspx
    In the end, you would have a view which displays rows and can be updated.
    If all you want is to modify rows without viewing them then HuaMin Chen's solution is the one for you, create a stored procedure instead.

  • How do I pass multiple values from a text box to an update statement

    I hope this does not sound to lame. I am trying to update multiple values Like this:
    Code|| Computer Desc || Computer Price || Computer Name
    SEL1 || Apple macbook || 1564 || Apple Macbook Basic
    SEL2 || Dell 630 || 1470 || Dell Latitude
    I want to change all six values at once in one update statement based on the Code, I can't find a good tutorial/example to help me.
    Can anyone point me in the right direction?
    Thanks so much,
    Laura

    You can do conditional updates with decode or case statements e.g.
    SQL> create table t as
      2  select 'SEL1' as code, 'Apple macbook' as comp_desc, 1564 as comp_price, 'Apple Maxbook Basic' as comp_name from dual union
      3  select 'SEL2', 'Dell 630', 1470, 'Dell Latitude' from dual
      4  /
    Table created.
    SQL>
    SQL> update t
      2  set comp_desc = CASE code WHEN 'SEL1' THEN 'Test1' Else 'Test2' END,
      3      comp_price = CASE code WHEN 'SEL1' THEN 1234 Else 2345 END,
      4      comp_name = CASE code WHEN 'SEL1' THEN 'Test1 Name' Else 'Test2 Name' END
      5  /
    2 rows updated.
    SQL>
    SQL> select * from t
      2  /
    CODE COMP_DESC     COMP_PRICE COMP_NAME
    SEL1 Test1               1234 Test1 Name
    SEL2 Test2               2345 Test2 Name
    SQL>

  • Update statement getting ORA-00904 invalid identifier

    I am getting this ORA error when I try to conduct an update statement from a column value in one table to a like-named column in another table.
    For instance, in my select, shown below, this query runs like a champ, returning all of my records
    SELECT
    b.ID,
    b.ZIP, a.ZIP,
    a.NAME,
    a.LOCATION
    FROM TBL_ARCHIVE a
    INNER JOIN TBL_UAT b ON
    a.ID = b.ID
    WHERE
    b.ID > 470000  And b.ID <470100;However, if I try to run an update statement with any of the following, I get this error. It seems so strange to me that I'd get an error using the same columns in the update statement, but would return the desired results effectively from the select statement!
    one version of UPDATE
    UPDATE TBL_ARCHIVE a
    SET a.ZIP = TBL_UAT.ZIP
    WHERE TBL_UAT.ID = a.ID;and another
    UPDATE TBL_ARCHIVE
    SET a.ZIP  =
    (SELECT b.ZIP
    FROM TBL_UAT b
    WHERE b.ID <472500 And b.ID >471000)
    FROM TBL_ARCHIVE a
    WHERE a.ID = b.ID)
    WHERE ID IN
    (SELECT ID
    FROM TBL_UAT b
    WHERE b.ID  <472500 And b.ID >471000
    );^ - this one produces a SQL not properly ended. Error ORA-00933: SQL command not properly ended.
    I'm really unsure though, how what I thought was a fairly basic update statement wouldn't work. I'm using Oracle 11g but through either Toad or SQL Plus. I've gotten these same errors in both.
    Though MS Access runs slow as snails, I can manage to run the update statement successfully with it, a thousand records or so at a time. Problem is, I've got about 300K records needing updating.
    I've looked around for similar problems but haven't found one where someone wasn't either using a reserved word for a column, which I'm not, I don't believe, or a problem that really dealt with this error in the context of an update statement.
    But I'd welcome any enlightenment on this.

    rp0428 wrote:
    UPDATE TBL_ARCHIVE a
    SET a.ZIP = TBL_UAT.ZIP
    WHERE TBL_UAT.ID = a.ID;That isn't a valid query and neither is the other one.
    Please post the actual query you are using and the actual complete error message you are getting (everything about the error that is displayed).^^
    That is NOT a valid query?
    How else would you have an UPDATE statement created to set the value of a column in table A to the value of a (in this case, same named) column in table B?
    And keep them in order to update the records appropriately?
    I'll append the create statements momentarily.
    Thanks!
    CREATE TABLE TBL_UAT
    ( ID NUMBER(6),
    ZIP VARCHAR2(10 BYTE) ) and
    CREATE TABLE TBL_ARCHIVE
    ( ID NUMBER(6) NOT NULL, NAME VARCHAR2(50 BYTE),
    EMAIL VARCHAR2(50 BYTE),
    LOCATION VARCHAR2(50 BYTE),
    DEPARTMENT VARCHAR2(50 BYTE),
    PRIORITY VARCHAR2(50 BYTE),
    APPROVING_MGR_NAME VARCHAR2(50 BYTE),
    TYPE1 VARCHAR2(50 BYTE),
    TYPE2 VARCHAR2(50 BYTE),
    CONTACT_NAME VARCHAR2(50 BYTE),
    CONTACT_PHN_NO VARCHAR2(50 BYTE),
    LOAN_NUM VARCHAR2(50 BYTE),
    REF_ID VARCHAR2(50 BYTE),
    BORROWER_NAME VARCHAR2(50 BYTE),
    ADDRESS VARCHAR2(50 BYTE),
    CITY VARCHAR2(50 BYTE),
    ST VARCHAR2(50 BYTE),
    ZIP VARCHAR2(10 BYTE),
    SALE_DATE DATE,
    COMMENTS VARCHAR2(800 BYTE),
    TIME_REQ DATE,
    ACCTLOC VARCHAR2(50 BYTE),
    OTHER_ACCTLOC VARCHAR2(50 BYTE)) Hope this can be of assistance.
    Thanks, folks!
    Edited by: user515689 on Feb 7, 2012 11:59 AM

  • Doubt in UPDATE Statement

    Hi,
    I need to update all values in 2 columns (Net_Quantity) and (Net_Amount) based on join condition with the another table in plsql block.
    Query which i tried
    UPDATE TFS_FRCST_TOOL_LINES SET NET_ORDERS_QTY=l_net_orders_qty and NET_AMOUNT=l_net_amount
    WHERE TFS_FRCST_TOOL_HDRS.HEADER_ID =TFS_FRCST_TOOL_LINES.HEADER_ID;
    It not updating, returns error like command not properly ended.
    Can any one please give idea to solve this.
    Regards
    Ajan

    Dave is right. The first thing that struck was 'and' and I had pointed it to the user who posted this.
    To Ajan --> You can try either of the options below,
    UPDATE TFS_FRCST_TOOL_LINES
    SET
    NET_ORDERS_QTY=l_net_orders_qty,
    NET_AMOUNT=l_net_amount
    WHERE
    TFS_FRCST_TOOL_LINES.HEADER_ID IN (SELECT TFS_FRCST_TOOL_HDRS.HEADER_ID FROM TFS_FRCST_TOOL_HDRS) ;
    UPDATE (select NET_ORDERS_QTY, NET_AMOUNT
    from TFS_FRCST_TOOL_LINES,TFS_FRCST_TOOL_HDRS
    where TFS_FRCST_TOOL_LINES.HEADER_ID=TFS_FRCST_TOOL_HDRS.HEADER_ID)
    set
    NET_ORDERS_QTY=l_net_orders_qty,
    NET_AMOUNT=l_net_amount

  • Function call in update statement

    Hi,
    I have an update statement as follows
    update
    tableA
    set
    some_Ind = 0
    where
    cond1=val1
    and some_Ind = 1
    and f_test(param1, param2) ='Y'
    If i have say total 5 rows in tableA and the some_Ind is set to 1 for 2 rows.
    Will this update stmt, call the funtion for all 5 rows ? and then update only the rows matching the condition?
    Because i am expecting this update stmt to call the function for only the 2 rows which has the some_Ind as set but i get the message printed out 5 times for 5 rows but it updates only 2 rows.
    Since this function f_test is very complex, i need to call it for only those rows to be updated.
    Please give your suggestions....thanx...

    I just gave the test function to display the two parameters.
    This function is displaying the messages for all the 5 rows and not for the 2 rows which match the condition.
    CREATE OR REPLACE FUNCTION f_test1 (param1IN VARCHAR2,param2 IN VARCHAR2)
    RETURN VARCHAR2 IS
    retInd varchar2(1);
    begin
    dbms_output.put_line('param1: '||param1);
    dbms_output.put_line(param2: '||param2);
    retInd := 'Y';
    DBMS_OUTPUT.PUT_LINE('Val of retInd:'||retInd);
    RETURN retInd;
    EXCEPTION
    WHEN OTHERS THEN
    dbms_output.put_line('other exception ');
    RETURN 'N';
    END;

Maybe you are looking for

  • Dynamic Filter Display in Report Designer

    Hi All, We have implemented a new BI reporting tool and are using Report Designer for the output format. The problem is that we cannot see any dynamic filters or navigational level when printing as RD takes it back to the original format. To overcome

  • One customer-two codes--urgent

    Hi all Today i came to know these two Tx codes as suggested by Ajinkya P (1)Customer Master - Flag for Deletion - Sales Area: VD06 (2)Customer List - Block: VD05 I have created a new code for an already existing customer by mistake.The new customer c

  • Transfer from AUC to Asset

    Hi I have small problem in settlement. 1.We ran settlement using KO88 for single order and posted to AUC using "Automatic settlement".Then ran "Full setllement" and posted value from AUC to Asset successsfully. 2.But we want to reverse the same. So w

  • Deactivate an active component of a Project (IWO10001)

    I activated 3 components under a project in CMOD. : IWO10001, IWO10009, IWO10031. I want to deactivate one component: IWO10001. I am succesfully able to take out the extra component, however in the program it still goes into the function module Call

  • Problems in ASM Diskgroup

    Hi everyone, I am installing infrastructure grid 11.2.0.2 for AIX 6.1 working with VIOS. And the root.sh failed, and it shows that can't create the diskgroup for OCR and voting disk. So i want to create it manually and it got this error: SQL> CREATE