My BI World

IBM Infosphere Datastage, Netezza, Microstrategy, SSIS, SSRS,Hadoop, BI, ETL, Data warehouse, SQL Server, Tableau, mongoDB

Tuesday, January 28, 2014

Deduping rows in Netezza / Deleting rows in Netezza.

netezza has a hidden rowid for every row in all tables. to dedup, you can do this:

delete from omszip_stage
where rowid in (
select  max(rowid) as rowid
from OMSZIP_STAGE
group by couponid, zip, pid
having count(*) > 1)


Posted by Tenny Susanto at 11:31 AM 22 comments:
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest
Labels: Netezza
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Labels

  • Datastage
  • Hadoop
  • Hive
  • Impala
  • Microstrategy
  • Mongodb
  • Netezza
  • Pig
  • Scripting
  • Shell scripting

Blog Archive

  • ▼  2014 (4)
    • ►  October (2)
    • ►  February (1)
    • ▼  January (1)
      • Deduping rows in Netezza / Deleting rows in Netezza.
  • ►  2013 (19)
    • ►  December (1)
    • ►  November (8)
    • ►  August (2)
    • ►  June (1)
    • ►  March (2)
    • ►  February (3)
    • ►  January (2)
  • ►  2012 (14)
    • ►  December (3)
    • ►  September (3)
    • ►  August (8)

Popular Posts

  • Useful Netezza Date Functions
  • Netezza External Tables
  • Netezza update based on a table join
  • How to run Microstrategy Tutorial documents / dashboards
  • Hive / Impala - create external tables with data from subfolders
  • Deduping rows in Netezza / Deleting rows in Netezza.
  • shell scripting cheatsheet
  • Custom Group vs Attribute ApplySimple in Microstrategy
  • Netezza regexp_like. Regex to find integers only
  • Sort a graph on a Microstrategy dashboard
Awesome Inc. theme. Powered by Blogger.