Comparing a record set

I am trying to compare if a record set has been changed by a
user during a forms session. The record set has over 70 columns.
My solution is to query the record set in pre-update trigger and
re-query the record in post-update trigger and compare for any
change. In order to compare, I have to write over 70 IF statements.
Is there a better way to do this?
thanks in advance!

May be that:
loop
   v_name := :system.cursor_item;     
   v_r := name_in(v_name);     
   -- you check, you have name item and value
   exit when replace(v_name, 'BLOCK1.', '') = Get_Block_property('BLOCK', Last_Item);     
   next_item; 
end loop;    

Similar Messages

  • Comparing 2 result sets

    Hello
    I have to compare 2 result sets and determine if they are the same.
    The queries are:
    SELECT CARRIER_ID,ROUTE_POSITION
    FROM ROUTE_WG_PHASE4
    SELECT CARRIER_ID,ROUTE_POSITION
    FROM ROUTE_WG_PHASE3
    I tried using minus but it does not work when the first result set has less records than the second.
    Oracle 10g
    Thanks

    I tend to go with Tom's suggestion in the "Comparing the Contents of Two Tables" section of http://www.oracle.com/technology/oramag/oracle/05-jan/o15asktom.html. It has the advantage of showing up missing duplicate rows (eg. where one table has 2 identical rows but the other has only 1).
    In your case, using Tom's method would give you a query of:
    SELECT carrier_id, route_position, COUNT(src1) count1, COUNT(src2) count2
    FROM   (SELECT a.*, 1 src1, TO_NUMBER(NULL) src2
            FROM   route_wg_phase4 a
            UNION ALL
            SELECT b.*, TO_NUMBER(NULL) src1, 2 src2
            FROM   route_wg_phase3 b)
    GROUP BY carrier_id, route_position
    HAVING COUNT(src1) <> COUNT(src2);

  • Comparing two data sets in BPEL

    Hey guys,
    There exists a web service that provides (and is the source of) data and a table that is independent of the service that holds the same data. I'm writing a BPEL 11g process to sync the data that is returned from the service with the data in the table. I invoke the service and database adapter to receive a collection of the data and I need to compare the two data sets to see what's in the service's data set that isn't in the table's data set, so that I can insert them into the table. I also need to compare the values of the data sets for possible updates to already existent records. I'm not sure how to do this though. I was thinking of using an embedded java activity to compare the two sets. What's the best way to do this? Code examples would be much appreciated.
    Thanks,
    Bill

    Hi Bill,
    How many records are we talking about here? BPEL may not be the best option for synchronisation of large data sets... Probably ODI would be more suitable...
    S.Ananth's solution is probably the simple and neat way to solve your case... would this operation BLINDLY update all records? Short answer: no
    Long answer... Merge first reads the corresponding records in the database, calculates any changes, and then performs a minimal update. INSERT, UPDATE, and MERGE make the most sense when you are thinking about a single row and a single table. However, your XML can contain complex types and map to multiple rows on multiple tables. Imagine a DEPT with many EMPS, each with an ADDRESS. In this case, you must calculate which of possibly many rows have changed and which to insert, update, or delete. If a specific row did not change or only one field changed, then the DML calls is minimal.
    About merge on DBAdapter...
    http://docs.oracle.com/cd/E28280_01/integration.1111/e10231/adptr_db.htm#BDCDBAJI
    Cheers,
    Vlad

  • Using a session object to hold the value of a record set?

    Hi,
    I'm trying to hold the value of a record set (or literally the content of a column in a query in a db) in a session variable so that I can call on this later and insert into another table.
    I'm not sure of the correct syntax, I've already made a connection to the DB. I'm trying the following but it doesnt seem to like the code:
    <% session.setAttribute("code",rs("column_name")); %>
    <%String attrib =
    String.valueOf ( session.getAttribute("code")); %>
    Hello <%= attrib %>
    Any ideas, I dont know how to reference the record set, I declared the recordset previously as rs. Help! Can't find examples anywhere on the net!

    So just to recap. I appear to be seeing the column name "custorderno" within the Microsoft Access query "lastcust". But I get "no data found" when I run the following code (which I have sectioned off)
    <!-- connect to database and lastcust query --!>
    <%
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
    Connection conn = DriverManager.getConnection("jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=C:/Tomcat/jakarta-tomcat-4.1.31/webapps/ROOT/Oatcake.mdb","","");
    Statement statement = conn.createStatement();
    String sql = "SELECT * FROM lastcust";
    ResultSet rs = statement.executeQuery(sql);
    while (rs.next()) {
    %>
    <TR><TD><%= rs.getString("custorderno") %></TD>
    </TR>
    <% session.setAttribute("code",rs.getString("custorderno")); %>
    <% String attrib =
    String.valueOf ( session.getAttribute("code") ); %>
    Hello <%= attrib %> [B]
    <%
    %>
    </TABLE>
    <%
    if (statement != null)
    statement.close();
    if (conn != null)
    conn.close();
    catch (Exception e) {out.print(e);}
    %>
    </BODY>
    </HTML>
    No as mentioned I am (as you can see) declaring everything as a string when in actual fact the contents of the "custorderno" within the query is set to a autonumber within MS Access.
    The while loop does work by returning the contents but the session object part is not working correctly with the following result returned:
    [B]java.sql.SQLException: No Data Found
    Help please!

  • How to get the record set into array?

    Hi,
    I want to get the record set into array in the procedure and do the processing of the array later in procedure.
    below is the stored procedure i am working on:
    procedure bulk_delete_group(p_group_id in Array_GroupListID) as
    begin
    for i in p_group_id.first..p_group_id.last loop
    --Here I have to get the list of user id before deleting group
    SELECT user_id into *<SOME ARRAY>* FROM group_members WHERE group_id = p_group_id(i);
    DELETE group WHERE group_id = p_group_id(i);
    --Process the user id array after group deletion..
    end loop;
    end bulk_delete_group;
    Thanks in advance
    Aditya

    Something like this ->
    satyaki>
    satyaki>select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
    PL/SQL Release 10.2.0.3.0 - Production
    CORE    10.2.0.3.0      Production
    TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
    NLSRTL Version 10.2.0.3.0 - Production
    Elapsed: 00:00:00.20
    satyaki>
    satyaki>
    satyaki>select * from emp;
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          9999 SATYAKI    SLS             7698 02-NOV-08      55000       3455         10
          7777 SOURAV     SLS                  14-SEP-08      45000       3400         10
          7521 WARD       SALESMAN        7698 22-FEB-81       1250        500         30
          7566 JONES      MANAGER         7839 02-APR-81       2975                    20
          7654 MARTIN     SALESMAN        7698 28-SEP-81       1250       1400         30
          7698 BLAKE      MANAGER         7839 01-MAY-81       2850                    30
          7782 CLARK      MANAGER         7839 09-JUN-81       4450                    10
          7788 SCOTT      ANALYST         7566 19-APR-87       3000                    20
          7839 KING       PRESIDENT            17-NOV-81       7000                    10
          7844 TURNER     SALESMAN        7698 08-SEP-81       1500          0         30
          7876 ADAMS      CLERK           7788 23-MAY-87       1100                    20
         EMPNO ENAME      JOB              MGR HIREDATE         SAL       COMM     DEPTNO
          7900 JAMES      CLERK           7698 03-DEC-81        950                    30
          7902 FORD       ANALYST         7566 03-DEC-81       3000                    20
    13 rows selected.
    Elapsed: 00:00:02.37
    satyaki>
    satyaki>create type np is table of number;
      2  /
    Type created.
    Elapsed: 00:00:03.32
    satyaki>
    satyaki>Create or Replace Procedure myProc(myArray np)
      2  is
      3    i   number(10);  
      4    rec emp%rowtype;  
      5  Begin  
      6    for i in 1..myArray.count
      7    loop  
      8      select *  
      9      into rec 
    10      from emp 
    11      where empno = myArray(i); 
    12     
    13      dbms_output.put_line('Employee No:'||rec.empno||' Name:'||rec.ename); 
    14    end loop; 
    15  End myProc;
    16  /
    Procedure created.
    Elapsed: 00:00:00.88
    satyaki>
    satyaki>
    satyaki>declare
      2    v np:=np(9999,7777);  
      3  begin  
      4    myProc(v);  
      5  end;
      6  /
    Employee No:9999 Name:SATYAKI
    Employee No:7777 Name:SOURAV
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.30
    satyaki>Regards.
    Satyaki De.

  • By which method,i can get  the no of rows in the record set?

    Does anyone help me that by which method,i can get the no of rows in the record set?
    now i use next() to check whether the next record is available or not?

    shashi_rajak wrote:
    under Practice Exercise #1 heading :
    there is a statement.
    "Now, the COUNT function does not need to retrieve all of the fields from the table (ie: employee_number, employee_name, and salary), but rather whenever the condition is met, it will retrieve the numeric value of 1. Thus, increasing the performance of the SQL statement."And have you ever tried it? Or do you simply blindly believe everything you read? And what sort of "authority" is "tech on the net"?
    P.S. A quick test on Oracle (and you must do each query at least twice throwing away the first result, as Oracle always caches things which will have an effect, and averaging the remaining attempts).
    count(*) -- 1 min 17 secs for 35,311,978 rows
    count(1) -- 1 min 19 secs for 35,311,978 rows
    Edit: And the table has 46 columns.

  • Doubt on Record set in File Content Conversion

    Hi
    Please give me the procedure for Deleting record set in file conet conversion means hoe can i delete Recordset(tag) using File conent conversion.
    Thanks

    hi
    <documentName>...
       <recordset>
    <NameA>
    <field-nameA1>field-value</field-nameA1>
    <field-nameA2>field-value</field-nameA2>
    <field-nameA3>field-value</field-nameA3>
    </NameA>
    <NameB>
    <field-nameB1>column-value</field-nameB1>
    <field-nameB2>column-value</field-nameB2>
    <field-nameB3>column-value</field-nameB3>
    </NameB>
       </recordset>
       <recordset>
       </recordset>
    </documentName>...
    In above file record set i want to delete usind sender side.
    Thanks

  • File content conversion record set per message

    Dear All,
    Problem:- File is of huge size because of which file content conversion is taking longer time and is failing.
    File format:-
    Header
    Detail
    Detail
    Header
    Detail
    Detail
    Detail
    Detail
    Header
    Detail
    Detail
    Trailer
    Trailer has total count of all detail record,header record and there are few checks as well as wrt other fields.
    We need to do all the above validation on the file and if it successful it shud process it otherwise alert shud be raised.
    As a step:-
    I have used record set per message for splitting up the file because of huge size this functionality is working fine but because of spitting of file i am not able to do trailer validation as XI is creating multiple records with different message ID's
    Is any other approch which will help to achieve both Spliting as well as validation
    chirag

    Chirag,
    simplest scenario I can think of is splitting the 2 reqs.
    1. create 2 folders, one for "in process" files and other for "validated" files.
    2. create 2 scenarios:
    2.1. your current sender system to in process folder (whatever to File).
           => In this you just do the validation, without FCC. You could create a simple module for that or even do it at mapping runtime, as you said (mapping may be easier to handle errors), and throw a runtime exception (which will eventually trigger an alert).
           => At the end, only files that go successfully throug the validation will be located in the "In Process" folder.
    2.2. do a simple file to file scenario (from "In Process" to "Validated" folder), this time executing FCC & splitting messages if necessary.
    Of course, this will only work if the module/mapping is able to process the large file anyway (hopefully yes, since it will still be a flat file and not XML yet).
    BR,
    Henrique.

  • How to put record set in loop

    Using the follwing query
    select distinct code from oalr where code > '" & AlertCode & "' and  code<=('" & code & "') "
    i got 5 records eg :5603,5604,5605,5606,5607
    record set fetching
    Ocode = CStr(rs4.Fields.Item(0).Value)
    Here  Ocode get only last record eg :5607, i want to take this 5 records in the loop how can i write the coding

    Thank for ur reply,
    But i not passing this in to matrix , i m going to pass the value in to anothe record set
    eg
    Ocode = CStr(rs4.Fields.Item(0).Value)
    select A.code,A.MsgData,B.UserSign,C.Portnum as MobileNum from OALR A inner join ALT1 B on A.Tcode=B.code inner join OUSR  c on C.UserID=B.UserSign where  A.code='" & Trim(Ocode) & "' ")
    I want to pass the Ocode value in to the loop.becoz only one value pass this query next time pass means duplicate value prob occure so i want to pass the Ocode value up to EOF. Give some solution

  • Reg: When trying for [Record Set Per Message] Payload not generating MONI

    Hi,
    Can you please change the value of FCC parameters from
    Record Set Per Message:: 1
    Key Field Value: KF
    Key Field Type: Case Sensitive
    Record Set Per Message:: 1
    Key Field Value: K01
    Key Field Type: Case Sensitive
    Regards,
    Chandra

    Hi,
      If you want to split file according to Record set per message, check below settings with your configuration.
    Ex file:
    Amarsrinivas,Eli,4444,XYZ,3
    Sachin,Tendulkar,29564,ABC,9
    Ajay,Jadeja,5555,PQR,5
    *IR PART*
    See this is the Outbound Data type I have created::
    *ADT_Record_Outbound     Complex Type     *                              
    Record                            Element           0..unbounded(This is used for if Record set per message more then one.Structure Occurance.Not the message type)               
    First_Name            Element       xsd:strin     1                    
    Last_Name            Element     xsd:string     1                    
    EMP_ID                            Element     xsd:string     1                    
    Project_Status            Element     xsd:string     1                    
    Experience            Element     xsd:string     1                    
    THis is the Inboudn Data type I have created::
    ADT_Record_Inbound
    *ADT_Record_Inbound     Complex Type     *
    Record                    Element      0..unbounded(This is used for if Record set per message more then one.Structure Occurance.Not the message type.One to one mapping done)                              
    FullName     Element     xsd:string     1                         
    Global_ID     Element     xsd:string     1                         
    Project     Element     xsd:string     1                         
    IT_Exp     Element     xsd:string     1                         
    This is the Mapping I have done.....
    ForSource Message TYpe I kep Occurancs as 1
    For Target Message Type as I kept Occurances as 1
    ID Part::
    CONTENT CONVERSION PARAMETERS::
    Document Name:: AMT_Record_Outbound
    Document Namespace:: http://xxxxxxxxxxxxxxxxxxxxx
    Document Offset::
    RecordSet Name::Record
    RecordSet Structure: ---:Record,*
    Recordset Sequence,* ::: Assensding
    Record Set Per Message:: (As you required)(According to that target file and message will create)(If you mention 2 each 2 structure one message will flow in SXMB_MONI)
    Key Field Value:
    Key Field Type: Case Sensitive
    Record.fieldSeparator= ,
    Record.endSeparator= nl
    Record.fieldNames= First_Name,Last_Name,EMP_ID,Project_Status,Experience
    ignoreRecordsetName= true
    Regards,
    Prakasu.M

  • Read only record sets ?

    We're using a function to return a ref cursor back to VB.
    Works great until we try and update it. As soon as we try and update the record set we're getting an error "Multi-step operation generated errors. ". It looks to us like the record set is read-only. We've tried using an in-out parameter to a procedure - same problem. However, it works fine as long as we pass the sql instead of a call to a function or procedure.
    We don't really want to have to pass the sql.
    Can anyone help with this ?
    Thanks,
    Tricia.

    Ref cursors that are returned to an application from a stored procedure are read-only if you're using ODBC or OLE DB. I believe that the beta .NET native provider will allow you to update returned ref cursors, however.
    The reason it works when you issue straight SQL is that the driver actually modifies your SQL statement to get the ROWID's for all the rows. Then, it's able to update rows by building its own SQL insert statement.
    Justin

  • Can we enable "Select record Set Message choice" of Table in left side

    Hi ,
    I have requirement to set the "Select Record Set " Message choice of a table region on left side.
    Ex:If there are more records in a table region and message choice available to select next set of records.
    You can chk in Workflow Status Monitor function.
    Its the Navigation Bar to be @ left side on the table Region whcih allows you to navigate the records set.
    Thanks,Sarath.
    Edited by: SarathL on Dec 13, 2011 4:59 PM

    Hi,
    Not sure what exactly you are looking for.
    The Next link and option to select next set of rows comes to your OA Table by default .. isn't it?
    -Idris

  • Nested sort order for record set?

    I've set up a record set using the Dreamweaver server behaviour wizard, and have sorted the records (a list of names) alphabetically.  However I need to do what I would describe as a nested sort order:  I want to sort firstly by a flag, and then in  alphabetical orde by name.
    Here's my code:
    $query_artists = "SELECT artist_id, artist_name, `new` FROM artists WHERE setting_flag = 'S' ORDER BY artist_name ASC";
    So  I want to order by a field called 'new' (and alphabetically for all  records with the flag), and then the remainder alphabetically.
    Is this possible?
    Thanks

    That's great, thankyou so much.  I thought it would be something simple but hadn;t been able to find it by googling it.  Working perfectly.
    SW

  • Compare two records within a view

    Hi,
    I wonder if it is possible to compare two or more records within a view, and how to do it.
    Thanks in advance.

    M. Comi wrote:
    I wanted to compare two records of the view and see if they are the same or not...
    My data are as follows:
    Soglia Ingresso_CL_PF     10     10
    Downgrade MDP 3     2102     2101
    I want to check if the "downgrade" records have the same values for the second and the third column, and in this case replace the values on the second record.
    But I did it with a select on the same fields of the original tables, plus two fields obtained with lag function...
    I don't know if it is clear or not, the important is that I got what I wanted.Sorry, it's not clear.
    Are you still having a problem? If so:
    (1) Please describe the problem.
    (2) What results do you want to see from the sample data you posted?
    (3) Is the second column of
    Downgrade MDP 3 2102 2101'Downgrade', 'MDP', 3, 2102, 2101, some combination, or NULL? When posting data, the most helpful thing is to post INSERT (or CREATE TABLE AS ...) statements. The second-best thing is to post formatted data. Type &#123;code&#125; before and after sections where spacing is important, and post column headers.

  • Record set size in Gantt Chart

    Hi all,
    I am developing an application that has a Gantt Chart.
    The tree drawn is a 2 level tree. I have two VOs.
    The second VO (Child) has more than 20 rows. I want to show only 10 child at once.
    Record set size attribute is the one that is used to restrict the size of the number of nodes displayed. Just like in HGRID.
    But when the graph is rendered the values that I give are being ignored and the entire graph is rendered.
    Any pointers or suggestions on this will be really helpful.
    Regards,
    Santhosh.

    Hi Santosh,
    As Anand suggested to add the "rownum <= 10" condition to limit the record set.
    But this condition should be set in View Link SQL(Query where clause).
    I hope this will work.
    Thanks
    Renu

Maybe you are looking for

  • How can I find overset text in a InDesign table and locate the page?

    I am currently using CC but see the same issue in CS5 as well. If text within a table is overset or cannot be displayed, I can use search/replace for a term that I know is in an affected cell, however InDesign will find the first instance but will no

  • Error while provisioning OIM - AD in SSL

    Hi All, I am trying to configure OIM - AD communication in SSL mode. for that, I installed the AD connector MSFT_AD_Base_91100 and i deployed it. It was successfully configured. and my OIM version is OIM9101. I configured the IT Resource by mentionin

  • Why am I not able to connect to my FTP host in Muse?

    Disclaimer: I am not an expert in web design or Muse but I am learning. I have a third party host that I have set up and it has worked great through the "upload to ftp host" but now for a reason I cannot figure out, it will not connect. I have logged

  • Any EVAL() equalant functions in SQL or PL/SQL

    good day i have 2 loops , outer loop has the real data from a table and inner loop has the column name to be selected from outer loop. so in runtime, i need to select the columns dynamically .thats why i use inner loop. please see below. for i in dat

  • Why can't I move my songs move into a playlist any more?

    I have discovered recently that the songs in my music library, both old and new, will not move as they always did, by clicking and dragging into a playlist.  I get a red crossed out circle and they just won't move!  Help!