Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A SQL challenge
Message
 
 
À
10/04/2014 14:40:58
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Versions des environnements
SQL Server:
SQL Server 2005
Application:
Web
Divers
Thread ID:
01598405
Message ID:
01598459
Vues:
43
>>Kevin,
>>
>>Just an example how to do this in SQL 2005 without CTE's
>
>
>Wow, thanks, that actually performs better than anything I'd seen prior to the new windowing features in SQL 2012. My first inclination is to use CROSS APPLY though there's additional cost to that.
>
>
>On the CTEs - in absence of recursion, they offer no functional benefit - they are syntax sugar for derived table subqueries (though some people prefer sugar!).
>
>
>Thanks, great answers. Wrap-up tonight, have to get back to work (or my power-nap, whichever I decide) :)

I think CROSS APPLY and the Subquery shown by Walter are actually equivalent. I prefer CROSS APPLY as we can have more than 1 column.

Brad Schulz had a blog explaining that CROSS APPLY and subquery is the same.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform