question

Bob G avatar image
0 Likes"
Bob G asked Jason Lightfoot edited

Problem with Table query using an alias in 2022 Update 1

The following works well in version 2022 but fails in 2022 Update 1:

int aisleNumber = 1;

Table queryTable = Table.query("SELECT * FROM RackNodes WHERE [Aisle #] == $1", aisleNumber);


The following error is reported when the query is executed:

exception: SqlQuery - Unknown error in: SELECT * FROM RackNodes WHERE [Aisle #] == $1


Did something change in 2022 Update 1 with respect to table queries? I did not find anything in the release notes.

Thanks!


FlexSim 22.1.1
table query
· 3
5 |100000

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

Jason Lightfoot avatar image Jason Lightfoot ♦ commented ·

TestTableQueryAlias_v22.0.fsm

This quick test model suggests it's still working in 22.1.1.

Are you able to upload your model for us to take a look? If needed you can change this question and mark it private so only FlexSim support can see it.

0 Likes 0 ·
Bob G avatar image Bob G commented ·

The error does not occur when I run the FlexScript code from the script console but does when included in a custom code activity. Model is attached.

TableQueryTest.fsm

0 Likes 0 ·
tablequerytest.fsm (28.9 KiB)
Jason Lightfoot avatar image Jason Lightfoot ♦ Bob G commented ·
Thanks for the test model, but I don't get an error with that model in 22.1 either - it correctly reads the values from the table. Are you using 22.1.1?
0 Likes 0 ·

1 Answer

·
Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered Jason Lightfoot edited

Okay - it errors if you add a breakpoint to the code.

I think this is a known bug and has been reported before. We'll make a note and this case too when it's fixed. Thanks for pointing it out.

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.