#DateForumTypeThreadPost
425 Jul 2014 @ 04:32 PDTDatabaseReplyCommon Table Expressions (CTE) Hi Dieter Thanks a lot for your answer. I'm using now the workaround with the changed order of the CTEs. It works.... Even if the optimizer would re-use a prior spool result...the SQL code ne...
323 Jul 2014 @ 07:39 PDTDatabaseReplyCommon Table Expressions (CTE) ....and please forget the second "WITH" :-)
223 Jul 2014 @ 07:37 PDTDatabaseReplyCommon Table Expressions (CTE) WITH FirstCTE (ParentNodeID,NodeID) AS (   -- let's assume a huge query...that's why I like to write the SQL only once and refer it twice in the recursive CTE   SELECT P...
123 Jul 2014 @ 02:39 PDTDatabaseTopicCommon Table Expressions (CTE) WITH FirstCTE (Attr1,Attr2) AS (  SELECT A.Attr1, A.Attr2 FROM DB.TBL_A A  ), SeccondCTE (FK_Attr1,Attr2,Attr3)  AS (  SELECT B.Attr1, B.Attr2, A.Attr1   FRO...