Only take new data(Urgent) [message #87556] |
Sun, 16 January 2005 00:30  |
suddin
Messages: 6 Registered: January 2005
|
Junior Member |
|
|
Dear all,
I have to block B1 and B1. B1 have one time afer 15 seconds it make a query to retrieve data. and after retrieveign the data in B1 it will insert only the new data to the block B2.In simple ward I need the code that will check data between B1 and B2 and will insert new data of B1 to B2. Can any one help me.
Regards,
Shalauddin.
|
|
|
|
Re: Only take new data(Urgent) [message #87587 is a reply to message #87560] |
Mon, 17 January 2005 23:31  |
Himanshu
Messages: 457 Registered: December 2001
|
Senior Member |
|
|
YES,
Database procedure will be best to do this.
This can be achived with a single statement:
insert into table1
((select * from table1
minus
select * from table 2)
Union
(Select * from Table2
minus
Select * from Table1)
);
Commit;
HTH
Regards
Himanshu
|
|
|