question

ana.pc2 avatar image
0 Likes"
ana.pc2 asked Jordan Johnson commented

Calculated Table Syntax Error

Hello!


I am using the following query on a Calculated Table (Calculated_Table_3):


SELECT Item, StartTime, EndTime, Station FROM Calculated_Table_1 
UNION ALL 
SELECT Item, StartTime, EndTime, Station  FROM Calculated_Table_2


After pressing reset, I get the the following syntax error twice:

syntax error, unexpected all, expecting end of code 
syntax error, unexpected all, expecting end of code


And I can't figure out where this is coming from exactly... I know that the syntax error shows up when I create a Gantt Chart with Calculated_Table_3...

When I remove the UNION ALL, the syntax error doesn't show up... but I need to combine both tables with duplicates...


It is working well but I get the error at the compiler console and that's all...but I don't like having there a syntax error showing up... I would like to figure it out...

Any ideas of where this is coming from?

Thanks for your time!

FlexSim 20.1.1
statistics collectorqueryflexsim 20.1.1calculated tablesql query
· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Jordan Johnson avatar image Jordan Johnson ♦♦ commented ·

Can you post a model that shows this issue? I've been unable to replicate it so far.

0 Likes 0 ·

1 Answer

Mischa Spelt avatar image
1 Like"
Mischa Spelt answered

I have seen this before and think it is due to the fact that both source tables don't contain any rows on reset, and UNION ALL doesn't like that. In fact I've seen a calculated table with update on Automatic not updating after this, until you manually "change" the query (by adding a space at the end, for example).

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

ana.pc2 avatar image ana.pc2 commented ·

Oh I see, it could be because actually it is working well... it is just the message at the compiler console.

Thanks for the reply!

0 Likes 0 ·