Retrieving latest updated or inserted records without using a trigger
I have to retrieve the latest updated/inserted records from a set of database tables. Say, if 'n' sets of different records have been updated or inserted into one or more different database tables then all the 'n' records of data should be retrieved using a java code without using a trigger.
helpmeplz wrote:
Thanks for your reply.
But I don't know when or from where or what kind of data gets inserted/updated into the tables. I need a listener or a component which can handle events occured on the particular set of database tables, and get the event data. the java code should get the updated/inserted rows that have been inserted into a set of database tables by a third party.
Please lemme know how I can do this.Realistically you can't.
If and only if the tables have a modification timestamp then you could use that. Every table would need it.
Other than that the only othe possibility would require that you keep an entire copy of each table in the memory, poll at a set interval and then do an entire comparison for each table. For very small data volumes (on the target tables) that is practical. For larger volumes it isn't.
Similar Messages
-
How to update and insert the records without using Table_comparison and Map_operation?
Use either join or MERGE see this Inserting, Updating, and Deleting Data by Using MERGE
-
Just downloaded latest updates to Camera Raw for use with my new Sony RX100 M3 but still can't get the RAW files to open. Any suggestions?
Never mind, I finally got it working, thanks!
-
HT1414 Can i download new updates for iOS iPhone4 without using itunes?
Can i download new updates for iOS iPhone4 without using itunes?
Thank you
I did try to do that, but it needs wifi connection to download the software i dont have wifi connection and one more thing, I dont have in front of me right now my personal computer im using another persons computer what should i do just to download the software update now and then when i got home i can download or transfer it on my personal computer when i get back. -
Select distinct records without using distinct
hi experts,
my retrieved data like these:
cnt_id cnt_type rcrd_id wrkflw_id
558848 PRODUCT 553503 248
558848 PRODUCT 553503 248
558848 PRODUCT 553503 248
558808 PRODUCT 553463 248
558808 PRODUCT 553463 248
558808 PRODUCT 553463 248
558810 PRODUCT 553463 248
558810 PRODUCT 553463 248
558810 PRODUCT 553463 248
now i want to select one record for each cnt_id without using any distinct function .. how can i do that?
regards,
SKPyou can use the below query
select * from t where rowid in (select max(rowid)
from t group by cnt_id)You're query is not the equivalent of DISTINCT.
SQL> ed
Wrote file afiedt.buf
1 create table t as
2 (select 558848 as cnt_id, 'PRODUCT' as cnt_type, 553503 as rcrd_id, 248 as wrkflw_id from dual union all
3 select 558848, 'RETURN', 553503, 248 from dual union all
4 select 558848, 'PRODUCT', 553503, 248 from dual union all
5 select 558808, 'PRODUCT', 553463, 248 from dual union all
6 select 558808, 'PRODUCT', 553463, 248 from dual union all
7 select 558808, 'PRODUCT', 553463, 248 from dual union all
8 select 558810, 'PRODUCT', 553463, 248 from dual union all
9 select 558810, 'PRODUCT', 553463, 248 from dual union all
10* select 558810, 'PRODUCT', 553463, 248 from dual)
11 /
Table created.
Elapsed: 00:00:00.01
SQL> select * from t where rowid in (select max(rowid) from t group by cnt_id);
CNT_ID CNT_TYP RCRD_ID WRKFLW_ID
558810 PRODUCT 553463 248
558808 PRODUCT 553463 248
558848 PRODUCT 553503 248
Elapsed: 00:00:00.00
SQL> select distinct * from t;
CNT_ID CNT_TYP RCRD_ID WRKFLW_ID
558810 PRODUCT 553463 248
558808 PRODUCT 553463 248
558848 RETURN 553503 248
558848 PRODUCT 553503 248
Elapsed: 00:00:00.00
SQL> -
How can i display recent update/delete/insert records in form
Hai !!!!
i am new for forms,.......any body tell me, how can i display recent no of records updated or no of records deleted or no of records are inserted in a form. these records count are display in display items....give me detail explination......
Subbu.....the easiest way is copy and paste the oracle-forms example from the OU.
You need form-level-trigger ON-ERROR + ON-MESSAGE, POST-INSERT, POST-UPDATE, POST-DELETE, three global variables and a procedure:
ON-ERROR
handle_message( error_code, 'ERROR: ' || ERROR_TYPE || '-' || TO_CHAR(ERROR_CODE) ||': '|| ERROR_TEXT );
ON-MESSAGE
handle_message( message_code, MESSAGE_TYPE || '-' || TO_CHAR(MESSAGE_CODE) || ': ' || MESSAGE_TEXT );
PROCEDURE handle_message( message_number IN NUMBER, message_line IN VARCHAR2 ) IS
BEGIN
IF message_number IN ( 40400, 40406, 40407 )
THEN
DEFAULT_VALUE( '0', 'GLOBAL.insert' );
DEFAULT_VALUE( '0', 'GLOBAL.update' );
DEFAULT_VALUE( '0', 'GLOBAL.delete' );
MESSAGE('Save Ok: ' ||
:GLOBAL.insert || ' records inserted, ' ||
:GLOBAL.update || ' records updated, ' ||
:GLOBAL.delete || ' records deleted !!!' );
ERASE('GLOBAL.insert');
ERASE('GLOBAL.update');
ERASE('GLOBAL.delete');
ELSE
MESSAGE(message_line );
END IF;
END;
POST-INSERT
DEFAULT_VALUE('0', 'GLOBAL.insert');
:GLOBAL.insert := TO_CHAR( TO_NUMBER( :GLOBAL.insert ) + 1 );
POST-UPDATE
DEFAULT_VALUE('0', 'GLOBAL.update');
:GLOBAL.update := TO_CHAR( TO_NUMBER( :GLOBAL.update ) + 1 );
POST-DELETE
DEFAULT_VALUE('0', 'GLOBAL.delete');
:GLOBAL.delete := TO_CHAR( TO_NUMBER( :GLOBAL.delete ) + 1 );try it
Gerd -
HT1222 how i update my ipad 2 without using i tunes anyone help????
currently i am on 4.3.1 .i want to update my ipad 2 on 5.0.1 without using i tunes can anyone help from where i can download ios5.0.1 firmware..thx
Have you tried syncing once and then try transferring purchase again? Syncing should trnafer them during the sync process.
Also make sure that you don't have content that you bought with another Apple ID that needs to be transfered as well. -
Inserting multiple rows using a single Insert statement without using dual
Hi all,
i am trying to insert multiple rows using a single insert statement like the below one.
The below one works fine..
But is there any other change that can be done in the below one without using dual...
insert all
into ps_hd_samp (num1,num2) values (1,1)
into ps_hd_samp (num1,num2) values (2,2)
into ps_hd_samp (num1,num2) values (3,3)
select 1 from dual;NiranjanSe wrote:
Hi all,
i am trying to insert multiple rows using a single insert statement like the below one.
The below one works fine..
But is there any other change that can be done in the below one without using dual...
insert all
into ps_hd_samp (num1,num2) values (1,1)
into ps_hd_samp (num1,num2) values (2,2)
into ps_hd_samp (num1,num2) values (3,3)
select 1 from dual;
SQL> create table ps_hd_samp (num1 number,num2 number);
Table created.
SQL> insert all
2 into ps_hd_samp (num1,num2) values (1,1)
3 into ps_hd_samp (num1,num2) values (2,2)
4 into ps_hd_samp (num1,num2) values (3,3)
5 select count(*)
6 from ps_hd_samp;
3 rows created.
SQL> select * from ps_hd_samp;
NUM1 NUM2
1 1
2 2
3 3 -
How to UPDATE MASTER DATA RECORD PA0377 using FM HR_INFOTYPE_OPERATION
How to UPDATE MASTER DATA RECORD IN INFOTYPE 0377 DIRECTLY using function module HR_INFOTYPE_OPERATION ? When i use operation = 'MOD' im getting an ERROR as NO DATA STORED FOR 0377 IN SELECTION PERIOD.
Can anyone please help me how to use HR_INFOTYPE_OPERATION to UPDATE MASTER DATA RECORD.
Thanks,
Karthi.Hi,
please check this code
it is very useful
infotypes: 0105.
parameters: p_pernr type p0105-pernr,
p_subty type p0105-subty,
p_begda type p0105-begda,
p_endda type p0105-endda,
p_opera type pspar-actio,
p_usrid type p0105-usrid,
p_commt as checkbox. "Useful only when NO_COMMIT is 'X'
data: w_return type bapireturn1, "Error handling data
w_key type bapipakey, "If record has been created or changed the created/ changed
"record's key (PSKEY) will be populated
v_message type string. "For printing returned messages
call function 'BAPI_EMPLOYEE_ENQUEUE'
exporting
number = p_pernr
importing
return = w_return.
if w_return is initial. "Employee is not locked
p0105-pernr = p_pernr.
p0105-subty =
p0105-usrty = p_subty.
p0105-begda = p_begda.
p0105-endda = p_endda.
p0105-usrid = p_usrid.
*Calls Internally HR_MAINTAIN_MASTERDATA
call function 'HR_INFOTYPE_OPERATION'
exporting
infty = '0105'
number = p_pernr
subtype = p_subty
validityend = p_endda
validitybegin = p_begda
record = p0105
operation = p_opera
dialog_mode = '0'
nocommit = 'X'
importing
return = w_return
key = w_key.
endif.
if w_return is not initial.
message id w_return-id type w_return-type number w_return-number
with w_return-message_v1 w_return-message_v2 w_return-message_v3
w_return-message_v4 into v_message.
case w_return-type.
when 'A' or 'E'.
format color col_negative. write:/ v_message.
when others.
format color col_heading. write:/ v_message.
endcase.
call function 'BAPI_EMPLOYEE_DEQUEUE'
exporting
number = p_pernr.
else.
format color col_positive. write:/ 'Record Updated Successfully.'.
if w_key is not initial.
write:/ 'Key contains',
/ 'Personnel Number:', w_key-employeeno,
/ 'Subtype (absence type):', w_key-subtype,
/ 'Start date of Absence:', w_key-validbegin,
/ 'End date of Absence:', w_key-validend.
endif.
commit work.
endif.
Thanks and regards
durga.K -
the site farmtowngifts.com worked very well prior to the latest update of firefox and firefox is even recommended by this site. Now it is not working properly.
uninstalled firefox ....deleted all files still remaining under mozilla firefox directory in program files ... to avoid having to reprogram all my settings, reisntall all addons as well .. I did not remove anything from mozilla firefox that is stored in either appdata or under the windows users directory (if any)
... the as suggested reinstalled the latest version of the firefox browser using the link you provided in the email ..; tested and several issues still remain present and unresolved ....
so please this is urgent or I will have to jump browsers and start using chrome .. because we work 14 hours a day 6 (sometimes 7) days a week, to get ready for the launch of our newest venture and we cannot lose that much days on browser related issues ... so please instead of putting me through week long step process .. of do this .. do that .. can you please actually look into the issue from your end .. I use firefox for so many, many years thta I deserve this kind of support .. thnx Robert -
HOW TO: Create a JSP Insert Record Form Using BC4J Data Tags
This is a JDeveloper Tech Note found on the OTN Documentation page. This note describes the use of the BC4J data tags to create insert/submit JSP pages. Here is a link:
http://technet.oracle.com/docs/products/jdev/technotes/datatag_input/Insert_Form.htmlYou can loop throgh query records whit an implicit cursor (which automatically manages the open cursor, fetch and next record):
for rec in (select intime,outtime,barcode,attend_date from dail_att; )
loop
t_in :=rec.intime;
t_out :=rec.outtime;
t_code :=rec.barcode;
t_date := attend_date;
PUT YOUR CODE HERE ... (if ..then... elsif... logic)
you can avoid setting variables 'cause you can directly use the implicit cursor variables: rec.intime etc.
end loop;
END;Anyway, I suggest you to check the where condition of your block ... because if not all data are retrieved there should be a problem in your query ... so even the cursor (if based on very same query) will return less data than expected.
Luca -
LSMW- How to modify existing Master Records without using Recording/SBatch?
Hi,
Can anyone tell me of an alternative way to modify massive Vendor Master records except a transaction recording or Standard Batch Program?
Actually my problem is that, i need to update Search Terms, whose lengths exceed the standard length for Search Terms.hi,
use fm ADDR_MAINTAIN_COMPLETE table ADDR1_DATA
A. -
Stored procedure returning multiple records without using SYS_REFCURSOR
Hello,
I am new to oracle stored procedures, have done stored procs in SQL server in past. I am trying to write single stored proc which will return multiple records. I have the stored proc as below and that is compiled without any errors.
We don't want to use SYS_REFCURSOR as output param b'coz the place from which this proc is gonna call, that system doesn't support SYS_REFCURSOR param.
create or replace
PROCEDURE p_get5500DATA_MB (
IN_plan_ID IN T_5500DATA_QWP.Plan_ID%TYPE,
IN_plan_ID_col OUT T_5500DATA_QWP.Plan_ID%TYPE,
p_SEQNUM OUT T_5500DATA_QWP.SEQNUM%TYPE,
p_HEADER_CD OUT T_5500DATA_QWP.HEADER_CD%TYPE,
p_VALUE1 OUT T_5500DATA_QWP.VALUE1%TYPE,
p_VALUE2 OUT T_5500DATA_QWP.VALUE2%TYPE
) AS
BEGIN
SELECT
Plan_ID,
SEQNUM,
HEADER_CD,
VALUE1,
VALUE2
INTO
IN_plan_ID_col,
p_SEQNUM,
p_HEADER_CD,
p_VALUE1,
p_VALUE2
FROM TRS1DBO.T_5500DATA_QWP
WHERE Plan_ID = IN_plan_ID
ORDER BY SeqNum;
-- EXCEPTION
-- WHEN OTHERS THEN
-- RAISE_APPLICATION_ERROR(-210001, 'Error in fetching data from T_5500DATA_QWP....');
END;
Error:
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "TRS1DBO.P_GET5500DATA_MB", line 10
ORA-06512: at line 11
My questions is:
- What would be the best practice for this type of simple stored procedures?
- Is there any alternate or is there anything i can fix in above stored proc which return multiple records?
Thank you,
VimalJust out of curiosity, what are you using for API or driver that doesn't support a ref cursor? Ref cursors are pretty much the defacto standard for passing multiple records out of an Oracle procedure. Oracle's ODP.NET, OLEDB, ODBC, JDBC, OCI, all support ref cursors. Chances are that if the driver you're using doesn't support something as basic/fundamental as a ref cursor, it's probably also not going to support something else either.
You'll most likely want to check with the driver/api vendor on their recommended approach. -
Inserting transitions without using footage
Hi,
I have a transition question, (relating to FCP X 10.0.3), I'm adding transitions between clips, I seem to recall that I used to drag a transition across, and as I got to insert it the clips would automatically part and the transition would drop in.
Now when I drag a transition, FCP X says it needs to use footage from either side to generate the transition, and generate it or cancel it. This is fine with long clips but not so good with the short ones. Does anyone know what I need to change to get this behaviour back?
Thanks in advanceYou don't seem to be aware of the importance of having HANDLES. Handles are pieces of your clip before and after the part that is used in the timeline. The handles are what FCP X uses when you create a transition.
When you select part of a clip inside an event (by dragging or setting an In and an Out point), and then insert this selection in a timeline, the outer bits of your clip that didn't get selected - i.e., the Handles - will be used for transitions. If you select ALL your clip, there are no handles. This has nothing to do with the length of the clip.
Having handles is the right way to do it and I hope that you will come to appreciate it.
If you force a transition without having handles, all your content to the right of the transition will be shifted, and the length of your movie will be reduced. This is BAD, as it will mess up things. For example, if you have a sound clip connected to your storyline and some images further down the story were synched to a beat in the music, they will become out of sync. -
API to update or insert records in BPA
Hi All,
We do a regular activity fo updating the BPA lines or inserting in our projects via dataloader. It is very cumbersome as sometimes we need to modify or insert 5k lines.
We get the records in a flat file(xls or sometimes in txt format).
Can anybody pls let me know the procedure to write an api for it. It would be of great help if somebody gives me step by step guidance
Thanks
vijaymetalink Ref Note 359295.1 [11i0] ; 437587.1 [R12]
Maybe you are looking for
-
IOS Update did not solve syncing issue
I'm still having problems with my playlists and art cover on my iPad 2 and my iPhone 4. On my iPad I can't see most of the artwork, but all playlists sync just fine. On my iPhone, artwork syncs just fine, but I can't find iTunes playlists (Top 25, Re
-
Hello all, I am searching for a component that will give me excel like functionality (sorting, searching, expanding subrecords,etc..)I dont need the full-blown formula functionality of excel. Basically I need to extract data from a db and display thi
-
MICRO, SMALL, AND MEDIUM Enterprise
Hi, Can any one tell me how can i get the details of vendor whihc is small, medium , and micro enterprise ? Do i need to define seperate vednor account group ? Or At the time of Vendor Master in CIN Details field , one field named SSI Status , where
-
Finding Source Codes where a Particular Message Is Used??
Hi All, Is there a good way to find out the Programs, FM, BAPIs, etc where a particular message number is used? I am trying to find source codes where the mesage TD 463 is used. I am getting this error by RSNAST00 program. It is used somewhere either
-
HI All, What are the steps i need to follow when i am going to configure the HTTP adapter in sending sid e, I created wsdl file and registered it in service registery. what else i need to do