Hi, try this :
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.

2010/3/30, Niraj Parihar <parihar.nirajsi...@gmail.com>:
> So finally the solution is that i should have a PL/SQL bloch which will
> retrive the columns at runtime and depends on to that i need to find out the
> duplicate rows and delete them, is that so?
> --
> Thanks and Regards,
> Niraj Singh Parihar
>
>
>
> On Tue, Mar 30, 2010 at 1:28 PM, sonty <saurabh.zen...@gmail.com> wrote:
>
>> Hi Andrej,
>>
>> Thanks for your response, I had a misunderstanding of count funtion.
>>
>> Regards,
>> Sonty
>>
>> On Mar 30, 10:44 am, Andrej Hopko <ado.ho...@gmail.com> wrote:
>> > Hi Sonty,
>> >
>> >      in other discussion in here we already discus the COUNT(*) and the
>> > fact, that oracle this way counts ROWIDs, not a real data (and ROWID is
>> > unique - at leas for table, possibly for higher volume of data)
>> >
>> > Andrej Hopko
>> >
>> > On 30. 3. 2010 6:58, sonty wrote:
>> >
>> > > Hi David,
>> >
>> > > Just a small question, "select count(*) from any_table" does mean
>> > > "select count(*) from any_table group by *" (the later is offcourse
>> > > wrong), Isn't it??
>> >
>> > > BR
>> > > Sonty
>> >
>> > > On Mar 29, 6:25 pm, Andrej Hopko<ado.ho...@gmail.com>  wrote:
>> >
>> > >> As David said - it seems lazy when you don't want to write so much
>> > >> columns (they also may change)
>> > >>       I say - where am I lazy in PL/SQL, there is place for some
>> thinking
>> > >> and EXECUTE IMMEDIATE (powerful thing, but thinking is quite
>> necessary)
>> >
>> > >> so you can query to USER_COLUMNS for column names, and build a
>> VARCHAR2
>> > >> variable with your query inside (example of such query is already in
>> > >> previous mail)
>> > >>       just look for some examples of EXECUTE IMMEDIATE with clause
>> INTO
>> > >> or clause USING
>> >
>> > >> good luck
>> >
>> > >> Andrej Hopko
>> >
>> > >> On 29. 3. 2010 14:30, ddf wrote:
>> >
>> > >>> On Mar 29, 5:00 am, Niraj Parihar<parihar.nirajsi...@gmail.com>
>> > >>> wrote:
>> >
>> > >>>> 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<
>> rajeshdhu...@gmail.com>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<
>> > >>>>> parihar.nirajsi...@gmail.com>    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
>> Oracle-PLSQL@googlegroups.com
>> > >>>>>> To unsubscribe from this group, send email to
>> > >>>>>> oracle-plsql-unsubscr...@googlegroups.com
>> > >>>>>> 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- Hide quoted text -
>> >
>> > >>>> - Show quoted text -
>> >
>> > >>> If you won't specify the columns for the table how do you propose to
>> > >>> find 'duplicate' records?  I believe I understand your desire (find
>> > >>> completely duplicate rows in the table) however you cannot do that
>> > >>> without specifying column names as group by doesn't accept * as an
>> > >>> operand.  You don't 'need' to find such a query, you simply want to
>> > >>> find one to avoid typing which appears lazy to me.
>> >
>> > >>> David Fitzjarrell- Hide quoted text -
>> >
>> > >> - Show quoted text -
>> >
>> >
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Oracle PL/SQL" group.
>> To post to this group, send email to Oracle-PLSQL@googlegroups.com
>> To unsubscribe from this group, send email to
>> oracle-plsql-unsubscr...@googlegroups.com
>> 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 Oracle-PLSQL@googlegroups.com
> To unsubscribe from this group, send email to
> oracle-plsql-unsubscr...@googlegroups.com
> 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.
>


-- 
Mohamed Badri
Consultant SI/BD/DW

ALTEN SIR - Groupe ALTEN
130-136 rue de Silly
92773 Boulogne-Billancourt
Tél : 06.50.54.75.67
mohamed.ba...@gmail.com
------------------------------------------

-- 
You received this message because you are subscribed to the Google
Groups "Oracle PL/SQL" group.
To post to this group, send email to Oracle-PLSQL@googlegroups.com
To unsubscribe from this group, send email to
oracle-plsql-unsubscr...@googlegroups.com
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.

Reply via email to