Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Continuation of Message #1594531 - Use of WHERE
Message
De
23/02/2014 11:12:37
 
 
À
23/02/2014 03:02:36
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Versions des environnements
SQL Server:
SQL Server 2008
Application:
Web
Divers
Thread ID:
01594922
Message ID:
01594992
Vues:
39
I stand corrected on the multiple CTE,s in one statement. I should have said that with that one CTE's cannot be used in more than one statement.

Right, you can't use the same CTE across multiple subsequent SELECT statements.

So in summary, this is permitted
;WITH CTE1 as  (select whatever),   CTE2 as (select whatever)
SELECT * from SomeTable  JOIN CTE1.... JOIN CTE2
But this is NOT permitted
;with cte1 as   (select whatever)

select * from sometable join CTE1
select * from somedifferenttable join CTE1
On the other issue with the link to the Microsoft Connect item, I understand what you mean, though no idea if it would ever be implemented. In reading the posts, I'm a little confused whether that became part of the SQL specification beyond the '99 standard (specifically, if it was expanded in SQL:2003)
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform