Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need to perform calculation with the previous record
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
00537434
Message ID:
00537486
Views:
15
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform