Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
[ FlexSim 21.2.4 ]
I've been trying for hours to write a very simple SQL query but I can't seem to find the correct synthax.
I have a List called "FinishedGoods" and I want to get the average of the field "Leadtime" and return it as a double avglt.
I wrote this but it doesn't work. I get "syntax error, unexpected '[', expecting end of code" in the Compiler Console.
Table result = Table.query("SELECT Leadtime FROM FinishedGoods \ AVG[Leadtime]"); double avglt = result[1]["Leadtime"];
What's wrong? I can't see it.
Thanks a lot,
Solved! Go to Solution.