Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calc Time query
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Divers
Thread ID:
00594564
Message ID:
00594649
Vues:
35
Something like this:

SELECT
(SELECT DATEDIFF(minute, begintime, endtime FROM table t2 WHERE blockmember=1 AND t2.blockid = table.blockid) / DATEDIFF(minute, begintime, endtime)
FROM
table
WHERE
isblock = 1

This could be rewritten without the subquery.

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

Click here to load this message in the networking platform