Would something like this get you started?
create table #temp (
Row_Ndb int,
Account_Nbr int,
Account_Name char(5),
Account_Desc char(3),
Begin_Date date,
End_Date date
)
insert into #temp values
(1, 1, 'test1', 'chk', '1/1/2012', '3/1/2012'),
(2, 1, 'test1', 'chk', '3/2/2012', '6/30/2012'),
(3, 1, 'test' , 'chk', '8/2/2012', '12/31/2012')
with cte
as
(
select row_ndb
, account_nbr
, account_name
, Account_desc
, Begin_date
, End_date
, row_number() over (partition by Account_Nbr order by begin_date) rownum
from #temp
)
select *
from
(
select cte1.*
, case when datediff(d,cte2.End_date,cte1.begin_date) > 2 then datediff(d,cte2.End_date,cte1.begin_date) else 0 end as DaysMissing
, case when datediff(d,cte2.End_date,cte1.begin_date) > 2 then dateadd(d,1,cte2.end_date) else null end as MissingBegin_Date
, case when datediff(d,cte2.End_date,cte1.begin_date) > 2 then dateadd(d,-1,cte1.Begin_date) else null end as MissingEnd_Date
from cte cte1
left join cte cte2
on cte1.account_nbr = cte2.account_nbr and cte1.rownum = cte2.rownum + 1
) source
where source.DaysMissing > 0
drop table #temp