Verwenden Sie mehrere CTE
Kann nicht herausfinden, wie mehrere CTE verwendet werden
Dies schlägt fehl
; with [cteOne] as (
select 1 as col
),
[cteTwo] as (
select 2 as col
)
select 'yesA' where exists (select * from [cteOne])
select 'yexB' where exists (select * from [cteTwo])
Das funktioniert - aber das ist nicht was ich brauche
; with [cteOne] as (
select 1 as col
),
[cteTwo] as (
select 2 as col
)
select * from [cteOne]
union
select * from [cteTwo]
Die eigentliche Syntax war ein Join zur Partition row_number ()
Ich habe gerade eine abgeleitete Tabelle verwendet