Execute to Cursor change to not check beyond cursor position
Currently you cannot use Execute to Cursor with a CTE. Error is returned as the process looks beyond the cursor.
example:
with cteone as
( 
select a.field 
from table1 a
)
select * from cteone <-- Cursor placed here and execute to cursor returns error
,ctetwo as
(
select b.field
from table2 b
)
select *
from cteone
                1
                 vote
              
            
 Troy Zoschke
    
 shared this idea
Troy Zoschke
    
 shared this idea
      
    The script is invalid.
The correct parsing of CTE statements on Execute Current Statement is supported.
 
        