View previous topic :: View next topic
|
Author |
Message |
tomehta
New User
Joined: 18 Aug 2008 Posts: 98 Location: India
|
|
Back to top |
|
|
CICS Guy
Senior Member
Joined: 18 Jul 2007 Posts: 2146 Location: At my coffee table
|
|
|
|
Quote: |
Uncommitted Read (UR) allows an application to access uncommitted changes of other transactions. |
I would have to wonder why the manual specifies 'other' rather than 'all'.... |
|
Back to top |
|
|
GuyC
Senior Member
Joined: 11 Aug 2009 Posts: 1281 Location: Belgium
|
|
|
|
DB2 remembers what you have done. just like you can select something you 've just inserted, or insert children of a just inserted parent.
The only way to get a row which is uncommitted deleted is with a cursor that uses a workfile.
Even in another thread with UR you won't see the deleted row.
with CS/RS/RR you won't get past the lock . |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suggest some re-design be considered.
If it has been deleted - it should not be available.
If it might be needed - do not delete it until it is no longer deleted. . . |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
if you are using db2 vsn 8 or 9 (i forget which - refer to the manuals)
there is a new ability to code your sql to select the row which you are deleting - in one sql statement. |
|
Back to top |
|
|
sushanth bobby
Senior Member
Joined: 29 Jul 2008 Posts: 1020 Location: India
|
|
|
|
Hi,
Here is the link and example
Code: |
SELECT * FROM OLD TABLE
(DELETE FROM employee WHERE emp_id = 12345)
|
Thanks,
Sushanth |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
Sushanth,
Man, are you hot or what! |
|
Back to top |
|
|
|