I assume you mean duplicate rows? If so, can you give details on what column(s) will be duplicated and how you want to determine which row to keep (eg earliest date etc).
yes i mean duplicate rows. My table consists of rows in which all the records are duplicated. Actually i transferred data from Symix(ERP) to my SQL table and got duplicated records.
For eg (pls dont mind if the fields are not in order)
Empo Firsname Lastname Age Salary Address
I1 smitha nair 20 10000 Bglr
I1 smitha nair 20 10000 Bglr
I2 Ajith T S 30 30000 Delhi
I2 Ajith TS 30 30000 Delhi
I2 Ajith TS 30 30000 Delhi
I3 James Anderson 25 20000 New York
I3 James Anderson 25 20000 New York
if this is the table which is having duplicate rows..
I want to retain only on record each.
My table has thousands of records and most of them are repating some 4-5 times. If I just want to retain top 1 record for each employee pls tell me what am i supposed to do.
If rows are absolutely identical, then simply do SELECT DISTINCT * INTO temptable trick.
------ heisenbug: A bug that disappears or alters its behavior when one attempts to probe or isolate it schroedinbug: A bug that doesn't appear until someone reads source code and realizes it never should have worked, at which point the program promptly stops working for everybody until fixed.
[ba
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.