In my openion, rowid can also be used to retrive the available rows when partial block corruption takes place.
any more ideas?
thanks
Printable View
In my openion, rowid can also be used to retrive the available rows when partial block corruption takes place.
any more ideas?
thanks
Hi..
Will please explain how Rowid can be used to find out the duplicate row as well as valid rows partially block courrpted table?
Thanks
Thomas P S
I have no idea about the corrupted block trick, but as for duplicate rows:
Consider a cross-reference table that has Student and Class. Also assume that during a bulk-load, the constraints were dropped for speed, but some duplicate data was loaded. How do we find the duplicate rows? More importantly, how do we delete *only* the duplicates?
DELETE
FROM
---StudentClass_T
WHERE
---(
------Student_ID---,
------Class_ID------,
------ROWID
---)---IN
---(
------SELECT
---------Student_ID---,
---------Class_ID------,
---------MAX(ROWID)
------FROM
---------StudentClass_T
------GROUP BY
---------Student_ID---,
---------Class_ID
------HAVING
---------COUNT(*) > 1
---)
Now, this assumes that there are only ever 2 copies of a single entry, and even for that special case, there are other ways that this can be written. I present this only as the easiest example for understanding the issue.
Make sense?
- Chris
Thank you Chris
-Thomas