question

Lars Jacobsen avatar image
0 Likes"
Lars Jacobsen asked Jason Lightfoot commented

Calculated table can not recognize string format

I am querying a Statistics Collector table from a Calculated Table. I prefer to write SQL directly, so I need to specify the data format in the Display Format pane, but there is no string option?


1693318150878.png


1693318177064.png

FlexSim 23.1.3
calculated table
1693318150878.png (47.4 KiB)
1693318177064.png (8.4 KiB)
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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot commented

You just use raw option, and if the field expression is a string, the result's field will be a string. The problem looks like it's your use of MAX with a string value - which equates to zero.

· 2
5 |100000

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

Lars Jacobsen avatar image Lars Jacobsen commented ·
Thanks Jason. The problem is that I am used to DB2 SQL, so I didn't consider that FlexSQL do not handle aggregate functions for strings.
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ Lars Jacobsen commented ·
Understood. Generally FlexSim's query language is closest to MySQL's implementation which I think in this case has the same numeric requirement for MAX().
0 Likes 0 ·