• Assuming you need this to be able to truly recurse through n number of levels - here's an actual recursive version of it:

    WITH testdata as (

    select 1 as ID, 0.11 as A, cast(0 as float(53)) as B union all

    select 2 as ID, 0.45 as A, 0.5 as B union all

    select 3 as ID, 0.85 as A, 0.75 as B

    ),

    recurseCTE as (

    select id,a,b,1-a*(1-b) as interim

    from testdata where ID=1

    UNION ALL

    select T.id,T.a,T.b,1-T.a*(1-T.b*r.interim) interim

    from testdata T join RecurseCTE R on T.id=R.id+1

    )

    select *, 1-interim as F

    from recurseCTE

    where ID=(select max(ID) from testdata)

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?