Hi Andrej,

Thanks for your response, I had a misunderstanding of count funtion.

Regards,
Sonty

On Mar 30, 10:44 am, Andrej Hopko <[email protected]> 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<[email protected]>  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<[email protected]>
> >>> 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<[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- 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 [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.

Reply via email to