MSCEWI4020

Common Table Expression not supported

Severity

Low

Description

This EWI is added when SnowConvert replace a Common Table Expression with TABLE(RESULT_SCAN(LAST_QUERY_ID())) in order to preserve the original behavior of the statement. The CTE is removed and the query is executed as a normal statatement.

Code Example

Input Code:

WITH CTE AS( SELECT * from table1)
INSERT INTO Table2 (a,b,c,d)
SELECT a,b,c,d
FROM CTE
WHERE e IS NOT NULL;

With DIFilter as (select * from t1)
    UPDATE t   
    SET     
    [PD_FIN] = s.[FIN]    
    ,[PD_Name]=s.[patient_name]      
    ,[BatchId] = s.[BatchId]     
    ,[LastUpdated] = getdate()   
    from  DIFilter as s;

Output Code:

Recommendations

  • No additional user actions are required.

  • If you need more support, you can email us at [email protected]

Last updated