2011-10-28 3 views

Répondre

1

Essayez ceci:

SELECT m1.moneypaid, 
    (SELECT TOP 1 m2.moneypaid 
    FROM @Money m2 
    WHERE m2.id <m1.id 
    ORDER BY m2.id DESC 
    ) AS Prev_Value 
    ,m1.moneypaid + (SELECT TOP 1 m2.moneypaid 
    FROM @Money m2 
    WHERE m2.id <m1.id 
    ORDER BY m2.id DESC 
    ) 
+0

cela fonctionne, je vous remercie –

Questions connexes