i got this question in an interview!
lats say i have a below table and i want to fetch the rows only till the period is currently active (all the rows above including Active Period = 1). if Active Period = 1 that means it currently Active.Query has to be dynamic lets say if the Active Period changes later then it has to fetch the rows till that period.
YEAR DETAILS ACTIVE PERIOD
2015 ONE 0
2015 TWO 0
2015 THREE 0
2015 FOUR 1
2015 FIVE 0
2015 SIX 0
2015 SEVEN 0
2015 EIGHT 0
2015 NINE 0
2015 TEN 0
2015 ELEVEN 0
2015 TWELVE 0
lats say i have a below table and i want to fetch the rows only till the period is currently active (all the rows above including Active Period = 1). if Active Period = 1 that means it currently Active.Query has to be dynamic lets say if the Active Period changes later then it has to fetch the rows till that period.
YEAR DETAILS ACTIVE PERIOD
2015 ONE 0
2015 TWO 0
2015 THREE 0
2015 FOUR 1
2015 FIVE 0
2015 SIX 0
2015 SEVEN 0
2015 EIGHT 0
2015 NINE 0
2015 TEN 0
2015 ELEVEN 0
2015 TWELVE 0
Comment