Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Find Plan Hash value fphv.sql Oracle
  • All Hints for Oracle Databases Oracle
  • remove archfiles only when it is applied to DR rm_archfiles.sh Linux/Unix
  • Adding Datafile on Primary Server and Impact on Standby Server Oracle
  • Free conference number from http://www.freeconference.com Oracle
  • segment_wise_space.sql segspace.sql Segment wise space usage (allocated and used) Oracle
  • AWR settings- MMON is not taking snapshot. Oracle
  • Database link password in user_db_links Oracle
  • secure crt settings Linux/Unix
  • Optimizer SORT Operations Oracle
  • Roles and Stored Procs II Oracle
  • good linux notes Linux/Unix
  • Guide to Linux System Command Mastery Linux/Unix
  • find_open_cur.sql Find open cursorts per session Oracle
  • DBMS_Shared_pool pinning triggers Oracle

Remove duplicate rows from table

Posted on 15-Jan-2008 By Admin No Comments on Remove duplicate rows from table

declare

cursor c1 is

select distinct PRODUCT_SKU, FIT_ID from geo_florist order by PRODUCT_SKU, FIT_ID;

begin

for cur1 in c1 loop

delete from geo_florist a

where a.rowid != ( select max(b.rowid) from geo_florist b

where a.product_sku = b.product_sku

and a.fit_id = b.fit_id)

and a.product_sku = cur1.product_sku

and a.fit_id = cur1.fit_id;

if (mod(c1%rowcount, 1000) = 0) then commit;

end if;

end loop;

end;

/

Oracle, SQL scripts

Post navigation

Previous Post: on IBM-AIX for display
Next Post: find the files that are 1 day old.

Related Posts

  • online_bkup.sql Oracle
  • To check whether standby is recovering properly or not?? Oracle
  • GSQ.sql Oracle
  • mutex in Oracle 10.2.0.2 or Oracle 10g Oracle
  • longtx.sql with the flag whether session is blocking any DML locks or not. Oracle
  • create database link syntax Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • Oracle (387)
  • PHP/MYSQL/Wordpress (10)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (336)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • SQL Tracker by SID sqltrackerbysid.sql22-Apr-2025
  • How to connect to Oracle Database with Wallet with Python.21-Mar-2025
  • JSON/XML Types in Oracle18-Mar-2025
  • CPU Core related projections12-Mar-2025
  • Exadata Basics10-Dec-2024
  • Reading config file from other folder inside class24-Sep-2024
  • Python class import from different folders22-Sep-2024
  • Transfer SQL Profiles from One database to other database.05-Sep-2024
  • Load testing on Oracle 19C RAC with HammerDB18-Jan-2024
  • Add new columns in dataframe30-Sep-2023

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • Difference between SYNC and AFFIRM Oracle
  • Good link for LIO in Oracle ( Logical IOs) Oracle
  • Logic to chech # of parameters command line parameters Linux/Unix
  • Best approach for Oracle database patching sequence to latest/required patchset along with CPU/PSU/any-other-one-off patch ID 865255.1 Oracle
  • crtgr.sql /* For creating trigger from data dictionary */ Oracle
  • Single character replacement in Unix Linux/Unix
  • 276434.1 Modifying the VIP or VIP Hostname of a 10g or 11g Oracle Clusterware Node Oracle
  • How to Decide upto what level you can decrement your datafile size. ( Shrink Datafile) Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme