;WITH myCTE(fname , lname) as( select fname,lname from myTable ) select * from myCTE
WITH myCTE(fname , lname) AS( SELECT fname,lname FROM myTable ) SELECT * FROM myCTE
Msg 102, Level 15, State 1, Line 2Incorrect syntax near ''.Msg 319, Level 15, State 1, Line 3Incorrect syntax near the keyword 'with'. If this statement is a common table expression, an xmlnamespaces clause or a change tracking context clause, the previous statement must be terminated with a semicolon.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)