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:
00538249
Vues:
11
>But I haven't of JOIN. I think that I can do something like:
>INNER JOIN thetable b ON b.date = (select min(date) ... where c.date > a.date )
>
>Can this be good?

this might be you're only option but I think you want a MAX() and not MIN(). You want the maximum date that is less than the date in the outer query.

-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