Hi niraj,
Look at owa_opt_lock.checksum function.
You can make a sub query to get the checksum for every line and do
Comparisons on this value.
Bellow an example of function use :
(you'll need user_name and table_name to call it)
SET SERVEROUTPUT ON
DECLARE
v_rowid ROWID;
BEGIN
SELECT rowid
INTO v_rowid
FROM emp
WHERE empno = 1302;
DBMS_OUTPUT.PUT_LINE(owa_opt_lock.checksum('SCOTT','EMP', v_rowid));
END;
/
Regards.
Cordialement,
Mohamed Badri.
Le 29 mars 2010 à 11:00, Niraj Parihar <[email protected]>
a écrit :
But here the column name is given and if i have 100 columns then in
that case it is not fieaseble to use this kind on query as i need
the query which works independent of the columns defined in the table.
--
Thanks and Regards,
Niraj Singh Parihar.
On Mon, Mar 29, 2010 at 1:06 PM, rajesh dhumal
<[email protected]> wrote:
Try this
SELECT COL_TO_CHECK, COUNT(COL_TO_CHECK)
FROM TABLE_NAME
GROUP BY COL_TO_CHECK
HAVING COUNT(COL_TO_CHECK) > 1
delete from test a
where rowid <> ( select max(rowid)
from test b
where a.sno = b.sno
and a.sname = b.sname )
This querry will find duplicate rows and delete those.
On Mon, Mar 29, 2010 at 11:55 AM, Niraj Parihar <[email protected]
> wrote:
Can any body help me on a query where i have to find out the number
of duplicate records in a table independent of the columns defined
in a table.
--
Thanks and Regards,
Niraj Singh Parihar
--
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
To unsubscribe from this group, send email to oracle-plsql
+unsubscribegooglegroups.com or reply to this email with the words
"REMOVE ME" as the subject.
--
Rajesh V.Dhumal
--
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
To unsubscribe from this group, send email to oracle-plsql
+unsubscribegooglegroups.com or reply to this email with the words
"REMOVE ME" as the subject.
--
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Oracle-PLSQL?hl=en
To unsubscribe from this group, send email to oracle-plsql+unsubscribegooglegroups.com or
reply to this email with the words "REMOVE ME" as the subject.