Title. Currently I simply manually add rows to the global table and fill in each table entry but it is quite slow.
Title. Currently I simply manually add rows to the global table and fill in each table entry but it is quite slow.
@Thomas JR It looks there is not a single method you can use, but it is not too complex to write a simple for loop that loops through the result of your query and copies the information to a table.
I already do so. Yes, it‘s very simple but I was looking for a built-in function because they are often faster, and my main concern for the moment is the execution speed of my model.
@Thomas JR This should not be slow. If you want to see where your model slows down, open the Flexscript Code Profiler under the Debug menu. There you can see if indeed this code is making your model slow or if there is something else.
Hi @Thomas JR, take a look at the cloneTo() method. You can easily clone the result of a query to a Global Table.
The problem is that I need to append several times to the same global table and cloneTo simply replaces the content with the result of the query.
Then you can include the first table:
Table results=Table.query("SELECT * FROM GlobalTable2 UNION ALL SELECT * FROM GlobalTable1"); results.cloneTo(Table("GlobalTable1"));
@jason.lightfoot, do you know a flag or clause to copy identical rows of involved tables? If I do this query the result is reduced to unique values only.
16 People are following this question.
FlexSim can help you understand and improve any system or process. Transform your existing data into accurate predictions.
FlexSim is a fully 3D simulation software environment. FlexSim can be used to simulate any process in any industry.
FlexSim®, FlexSim Healthcare™, Problem Solved.®, the FlexSim logo, the FlexSim X-mark, and the FlexSim Healthcare logo with stylized Caduceus mark are trademarks of FlexSim Software Products, Inc. All rights reserved.
Privacy | Do not sell or share my personal information | Cookie preferences | Report noncompliance | Terms of use | Legal | © Autodesk Inc. All rights reserved