How will you delete duplicate records from a table?
Answer Posted / ajay kumar ande
question is wrong......records-----files,table-----rows
How will you delete duplicate records(rows) from a table?
pgm=sort
sortin dd dsn=-----
sortout dd dsn=-----
sysin dd *
sort fields=(2,3,ch,a)
sum fields=none ------>eliminates duplicate recs
| Is This Answer Correct ? | 3 Yes | 1 No |
Post New Answer View All Answers
What is the reason behind not using select * in embedded sql programs?
Which are the db2 tools to protect integrity of the database?
before altering a table is it necessary to lock ? if lock what is it ? how to do ? ifi want to lock a table what is that command ?
How is a typical db2 batch pgm executed?
Which is faster delete or truncate?
Mention the various locks that are available in db2.
ther r 2 tables OTTABLE & SALTABLE, add the otamt from OTTABLE to empsal of SALTABLE if eid is matched else add the unmatched from OTTABLE to SALTABLE
How to view db2 table structure?
How do I connect my db2 database to ibm?
What is sqlca’s maximum length?
How will you return the number of records in table?
How can we retrieve the total number of records in RPG & CLLE?
Discuss about db2 bind?
What is the difference between cursor and select statement?
Mention data types used in db2 ?