Re: SQL PROBLEM for duplicate rows..

2001-05-25 Thread Burçin Üstün Kýlýç

I am sorry I made a mistake in naming . Correct one is below:
delete from table_name where rowid not in (select maxrowid from (select
 column1,column2, max(rowid) maxrowid  from table_name group by
column1,column2));

- Original Message -
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
Sent: Friday, May 25, 2001 1:22 PM


> I think this query eliminates the duplicated rows:
>
> delete from table_name where rowid not in (select maxrowid from (select
> column1,column2, max(rowid) maxrowid  from den group by column1,column2));
>
> - Original Message -
> To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
> Sent: Friday, May 25, 2001 1:01 PM
>
>
> > Hi
> >
> > Table A got some duplicated rows.. The requirement is to delete the
> > duplicate records by maintaing one copy..
> > Is it manageable thru single query? or have to go for PL/SQL procedure?
> >
> > Pl. send me ur valuable inputs.
> >
> > Saravanakumar
> >
> >
> > --
> > Please see the official ORACLE-L FAQ: http://www.orafaq.com
> > --
> > Author: N. SARAVANA KUMAR
> >   INET: [EMAIL PROTECTED]
> >
> > Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
> > San Diego, California-- Public Internet access / Mailing Lists
> > 
> > To REMOVE yourself from this mailing list, send an E-Mail message
> > to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> > the message BODY, include a line containing: UNSUB ORACLE-L
> > (or the name of mailing list you want to be removed from).  You may
> > also send the HELP command for other information (like subscribing).
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: =?iso-8859-1?B?QnVy52luINxzdPxuIEv9bP3n?=
>   INET: [EMAIL PROTECTED]
>
> Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California-- Public Internet access / Mailing Lists
> 
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: =?iso-8859-1?B?QnVy52luINxzdPxuIEv9bP3n?=
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: SQL PROBLEM for duplicate rows..

2001-05-25 Thread Burçin Üstün Kýlýç

I think this query eliminates the duplicated rows:

delete from table_name where rowid not in (select maxrowid from (select
column1,column2, max(rowid) maxrowid  from den group by column1,column2));

- Original Message -
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
Sent: Friday, May 25, 2001 1:01 PM


> Hi
>
> Table A got some duplicated rows.. The requirement is to delete the
> duplicate records by maintaing one copy..
> Is it manageable thru single query? or have to go for PL/SQL procedure?
>
> Pl. send me ur valuable inputs.
>
> Saravanakumar
>
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author: N. SARAVANA KUMAR
>   INET: [EMAIL PROTECTED]
>
> Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
> San Diego, California-- Public Internet access / Mailing Lists
> 
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from).  You may
> also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: =?iso-8859-1?B?QnVy52luINxzdPxuIEv9bP3n?=
  INET: [EMAIL PROTECTED]

Fat City Network Services-- (858) 538-5051  FAX: (858) 538-5051
San Diego, California-- Public Internet access / Mailing Lists

To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).



Re: Help on query

2001-05-22 Thread Burçin Üstün Kýlýç
Title: Help on query



Hi,
I think It gives the right respose for 
you:
 
select a.std_no from exam a ,exam b where 
(a.subject='CHEM' and a.POINT='A') and (b.subject='PHYSIC' and 
b.POINT='A')and a.std_no=b.std_no;

  - Original Message - 
  From: 
  Ahmadsyah Algozhi 
  Nugroho 
  To: Multiple recipients of list ORACLE-L 
  Sent: Tuesday, May 22, 2001 11:31 
AM
  Subject: Help on query
  
  Dear gurus, 
  I have a table : Tabel Exam 
  STD_NO SUBJECT POINT == === 
  = 001    
  CHEM A 001    
  PHYSIC   A 001    
  BIOLOGY  A 
  002    CHEM A 
  002    PHYSIC   B 002    BIOLOGY  A 
  003    CHEM A 
  003    PHYSIC   A 003    BIOLOGY  B 
  What is the SQL query to retrieve STD_NO which have CHEM = A 
  and PHYSIC = A? 
  The output should be : STD_NO 
  == 001 003 
  TIA, 
  Ahmadsyah Alghozi Nugroho Database 
  Engineering Specialist PT Infoglobal AutOptima 
  Jl. Baruk Tengah I/49 Surabaya - Jawa 
  Timur INDONESIA phone : +62 
  (31) 8708456 ext.113 visit [ORAID!] http://oraid.iwarp.com