| How to compare pre-image and post-image after update and before commiting [message #370437] | 
			Fri, 24 September 1999 10:35   | 
		 
		
			
				
				
				
					
						
						m a sivan
						 Messages: 34 Registered: July 1999 
						
					 | 
					Member  | 
					 | 
		 
		 
	 | 
 
	
		I have an update Query which will update one field . It updates say five thousand records. 
 
How can I compare the preimage of these values with the post image. Like if  
 
i was having X previously and now I have changed it to Y how will I  find out that X was changed to Y .  
 
I did achieve this using temporary table but is there any other way like creating savepoint etc. or transaction etc.
		
		
		
 |  
	| 
		
	 | 
 
 
 | 
	
		
		
			| Re: How to compare pre-image and post-image after update and before commiting [message #370445 is a reply to message #370437] | 
			Fri, 24 September 1999 15:19   | 
		 
		
			
				
				
				
					
						
						Prashanth
						 Messages: 41 Registered: September 1999 
						
					 | 
					Member  | 
					 | 
		 
		 
	 | 
 
	
		This is an example of update. 
If you've got another solution for this let me know. 
            Thanks, 
 
FROM SQL*PLUS SESSION EXECUTE THE 
FOLLOWING COMMAND 
 
SQL>execute dbms_application_info.set_module('app3','UPDATE ABC3'); 
SQL>UPDATE ABC1 SET Y1 = 3; 
   4 rows updated. 
----DO NOT  COMMIT 
---NOW QUERY THE  DYNAMIC PERFORMNANCE VIEW 
----V$SQLAREA 
SQL>select sql_text from v$sqlarea 
  2* where sql_text like 'UPDATE%'; 
---NOW YOU SEE 
SQL_TEXT 
-------------------------------------------------------------------------------- 
UPDATE ABC SET Y1 = 2 
UPDATE ABC SET Y1 = 3
		
		
		
 |  
	| 
		
	 | 
 
 
 |