kiran.rajenimbalkar (4/17/2013)
if end date column would be null then pls treat as 20790606please check only fg_end_dt_key column
(20790606-20130416) ---660190
(20130416-20130128) --288
(20130128-20130128) --0
This doesn't seem to be related to the sample data provided
Your sample data has 4 rows inserted
We would like to know what value would you like the additional column to hold for these 4 rows
How to post data/code on a forum to get the best help - Jeff Moden
http://www.sqlservercentral.com/articles/Best+Practices/61537/