Answered Questions

  • How do you display last 5 records in DB2?

    madhavan

    • Mar 10th, 2014

    SELECT * FROM Table_Name order by column_name desc Fetch first 5 rows only;

    Mohit

    • May 28th, 2012

    There is nothing called "fetch last n records only" in db2...

    You can use select col1 from table1 order by col1 desc fetch first 5 records only

  • How do you remove duplicates in dataset

    in how many ways we can delete dataset? If a record is duplicated 3 times then how to get middle duplicated record? Is it advisable to use basic Tfr in Parallel jobs?

    srkreddy111

    • Aug 12th, 2011

    First you have to open the data set and click on the partitioning and after click hash partition and next click perform sort after click on unique and after ok and after compile and run the job.open the target output,the duplicate records are removed..