question

martin.j avatar image
0 Likes"
martin.j asked anthony.johnson answered

Is SQL GROUP BY multiple fields possible in Flexsim?

In standard SQL the GROUP BY statement can take multiple comma separated fields, but in Flexsim it simply says "syntax error, unexpected identifier, expecting end of code". Am I simply doing it wrong or is there a way to do this?

query("SELECT [Field1], [Field2],SUM(Field1) FROM Table ORDER BY Field1, Field2");
FlexSim 16.2.2
sqlgroup by
5 |100000

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

1 Answer

·
anthony.johnson avatar image
0 Likes"
anthony.johnson answered

Right now the group by will only take a single expression. If both fields are numbers, you could just combine them with some math expression: GROUP BY 10000 * Field1 + Field2

5 |100000

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

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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