Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need to perform calculation with the previous record
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
00537434
Message ID:
00537486
Vues:
13
This message has been marked as the solution to the initial question of the thread.
It's easier if you were sure that there was a record for each date:

SELECT
a.item,
a.date,
a.value,
b.date,
b.value
FROM
thetable a
INNER JOIN thetable b ON b.date = a.date + 1
WHERE
ABS((a.value / b.value) - 1) > .5

-Mike
Michael Levy
MCSD, MCDBA
ma_levy@hotmail.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform