question

Guldberg avatar image
0 Likes"
Guldberg asked Jeanette F commented

Querying list partition

Im trying to count the number of rows in a partion where a label is a certain value, but my query doesnt work for some reason

  1. List cranework = List("CraneWork");
  2. Table result = Table.query("SELECT * FROM cranework.$1",01);
  3. result.cloneTo(Table("QueryDump"));

I tried hardcoded .01 and putting "01" but no luck the query only kicks up an error

  1. exception: FlexScript exception: No resolved tables at MODEL:/Tools/ProcessFlow/CraneControlPF/Custom Code>variables/codeNode


Its a partitioned global list looking like this

1697716299841.png


Am I missing something?


FlexSim 23.2.1
sqlglobal list
1697716299841.png (6.1 KiB)
· 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.

1 Answer

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

List names are case sensitive - you can't use 'cranework' for 'CraneWork' like you have as a local variable.

Correct syntax:

  1. Table result = Table.query("SELECT * FROM CraneWork.$1","01"); 
  2. result.cloneTo(Table("QueryDump"));
5 |100000

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