Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Is it possible to use nested common table expression?!I am trying out something like this:with RS1(Column1,Column2)( with RS2(RS2Column1,RS2Column2) ( query ) select * from RS2,RS3 where rs2.RS2Column1=RS3.Column1)select count(*) from RS1Any help would be appreciated and remembered forever?! :)Thank youRegardsRaj
Sachin.Nand
2937 Posts
Posted - 2010-12-18 : 04:54:38
Something like this
;with RS1(Column1,Column2)as(select * from RS1),RS2 as ( select * from RS1,RS2 where RS1.Column1=RS2.Column1)select * from RS2