I am in the process of simplifying a complicated select statement, so thought I would use common table expressions.
Declaring a single cte works fine.
WI
I think it should be something like:
WITH cte1 as (SELECT * from cdr.Location), cte2 as (SELECT * from cdr.Location) select * from cte1 union select * from cte2
Basically, WITH is just a clause here, and like the other clauses that take lists, "," is the appropriate delimiter.
WITH