• Nita Reddy - Wednesday, January 11, 2017 11:32 AM

    from the below table I need the Last_data and last_data from 6 month. with different DB_nameso my output would look like :DB_name backup_start Backup_finishStock_any 8/1/2016 8/1/2016Stock_any 1/1/2017 1/1/2017Bond 8/1/2016 8/1/2016Bond 1/1/2017 1/1/2017DB namebackup StartBackup FinishStock_Any5/1/20165/1/2016Stock_Any6/1/20166/1/2016Stock_Any7/1/20167/1/2016Stock_Any8/1/20168/1/2016Stock_Any9/1/20169/1/2016Stock_Any10/1/201610/1/2016Stock_Any11/1/201611/1/2016Stock_Any12/1/201612/1/2016Stock_Any1/1/20171/1/2017bond5/1/20165/1/2016bond6/1/20166/1/2016bond7/1/20167/1/2016bond8/1/20168/1/2016bond9/1/20169/1/2016bond10/1/201610/1/2016bond11/1/201611/1/2016bond12/1/201612/1/2016bond1/1/20171/1/2017

    You mention "from 6 month", but your sample output includes August 1st and January 1st, which are exactly 5 months apart, not six.   Please explain that discrepancy as well as provide your data in consumable form, which means CREATE TABLE statements and INSERT statements.

    Steve (aka sgmunson) 🙂 🙂 🙂
    Rent Servers for Income (picks and shovels strategy)