cancel
Showing results for 
Search instead for 
Did you mean: 

Parsing failed when creating derived table

0 Kudos

Hello,

I am trying to create a derived table in the universe and can get the SQL to validate but then am getting a parsing failed error.  Here is the code I used. Also, when I take the ' ' off the field names I get a multi-part identifier cannot be bound. 

WITH date_range (calc_date) AS (

     SELECT DATEADD(DAY, DATEDIFF(DAY, 0, 'Opportunity_T5.Project_End_Date__c') - DATEDIFF(DAY, 'Opportunity_T5.Project_Start_Date__c' , 'Opportunity_T5.Project_End_Date__c'), 0)

      UNION ALL SELECT DATEADD(DAY, 1, calc_date)

          FROM date_range, Opportunity_T5

          WHERE DATEADD(DAY, 1, calc_date) <= 'Opportunity_T5.Project_End_Date__c')
SELECT calc_date, Opportunity_T5.Id

FROM date_range, Opportunity_T5

Thanks!

Kara

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Kara,

If the SQL validates correctly then you can create the objects off the derived table and test them in Webi report.

Sometimes, even if there is a 'parsing' error, the objects that are created off such a table work properly and generate correct SQL.

-Prathamesh