Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Write a single SQL to delete duplicate records from the a
single table based on a column value. I need only Unique
records at the end of the Query.

Answer Posted / tdguy

creating a new table would be the best option, if all the
field values are same, as far as i know.
CREATE NEW_TABLE AS OLD_TABLE WITH NO DATA;
INSERT INTO NEW_TABLE
SELECT COLUMN1, COLUMN2,COLUMN3 FROM OLD_TABLE
QUALIFY ROW_NUMBER() OVER
(PARTITION BY COLUMN1, COLUMN2,COLUMN3
ORDER BY COLUMN1, COLUMN2,COLUMN3 ASC ) = 1;
DROP TABLE OLD_TABLE;
RENAME NEW_TABLE TO OLD_TABLE;

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Difference between multiload and tpump?

1038


My table got locked during mload due to a failed job. What do I do to perform other operations on it?

1041


What do you mean by teradata intellicloud?

975


What is meant by a Channel Driver?

1142


What are the things to be considered while creating secondary index?

1033


What are the various indexes in teradata?

966


How to load specific no.of records using bteq, or fastload,or multiload

1691


In Teradata, how do we Generate Sequence?

980


What are teradata utilities?

1031


What happens in a conflict? How do you handle that?

986


What are the design features involved in teradata?

973


Explain the types of join supports by teradata?

935


What are the steps to create a data model?

981


What type of indexing mechanism do we need to use for a typical data warehouse?

1080


Is multi insert ansi standard?

2144