January 11, 2017 at 11:32 am
from the below table I need the Last_data and last_data from 6 month. with different DB_name
so my output would look like :
DB_name backup_start Backup_finish
Stock_any 8/1/2016 8/1/2016
Stock_any 1/1/2017 1/1/2017
Bond 8/1/2016 8/1/2016
Bond 1/1/2017 1/1/2017
DB namebackup StartBackup Finish
Stock_Any5/1/20165/1/2016
Stock_Any6/1/20166/1/2016
Stock_Any7/1/20167/1/2016
Stock_Any8/1/20168/1/2016
Stock_Any9/1/20169/1/2016
Stock_Any10/1/201610/1/2016
Stock_Any11/1/201611/1/2016
Stock_Any12/1/201612/1/2016
Stock_Any1/1/20171/1/2017
bond5/1/20165/1/2016
bond6/1/20166/1/2016
bond7/1/20167/1/2016
bond8/1/20168/1/2016
bond9/1/20169/1/2016
bond10/1/201610/1/2016
bond11/1/201611/1/2016
bond12/1/201612/1/2016
bond1/1/20171/1/2017
January 11, 2017 at 11:50 am
Nita Reddy (1/11/2017)
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_finish
Stock_any 8/1/2016 8/1/2016
Stock_any 1/1/2017 1/1/2017
Bond 8/1/2016 8/1/2016
Bond 1/1/2017 1/1/2017
DB namebackup StartBackup Finish
Stock_Any5/1/20165/1/2016
Stock_Any6/1/20166/1/2016
Stock_Any7/1/20167/1/2016
Stock_Any8/1/20168/1/2016
Stock_Any9/1/20169/1/2016
Stock_Any10/1/201610/1/2016
Stock_Any11/1/201611/1/2016
Stock_Any12/1/201612/1/2016
Stock_Any1/1/20171/1/2017
bond5/1/20165/1/2016
bond6/1/20166/1/2016
bond7/1/20167/1/2016
bond8/1/20168/1/2016
bond9/1/20169/1/2016
bond10/1/201610/1/2016
bond11/1/201611/1/2016
bond12/1/201612/1/2016
bond1/1/20171/1/2017
Please present your data in consumable format – you've been here long enough to know how to do this.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
January 11, 2017 at 2:06 pm
What have you tried?
How do you define Last_data and last_data from 6 month?
Are the backup Start and Backup Finish dates always the same? Do they include times?
January 17, 2017 at 1:48 pm
Nita Reddy - Wednesday, January 11, 2017 11:32 AMfrom 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)
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply