question

asb.p avatar image
0 Likes"
asb.p asked asb.p commented

How to PIVOT a table in Flexsim?

Hello,


I am trying to use a calculated table to consolidate the data from a transaction table.

Transaction Table

Seq Model StayTime

1 A 1

1 B 2

2 A 3

I basically want to consolidate the above table into following

Seq A B

1 1 2

2 3

For that I tried to write a SQL Query using PIVOT command which are not working.

Can any one help me with a sql commend for the same.

Thanks,

Praneeth.

FlexSim 18.1.0
calculated tablesql queries
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·

SQL is a kind of interface. It doesn't support the whole library clauses. As a start what you can use, please look into the manual and the reference. At the end you find a list of supported clauses. If the clause "PIVOT" is there on the list, you can use the clause otherwise not.

0 Likes 0 ·

1 Answer

·
Jordan Johnson avatar image
0 Likes"
Jordan Johnson answered asb.p commented

We don't support the PIVOT clause in FlexSim's SQL. You will need to reference the help manual for the list of clauses we do support. In 2018 Update 1, this topic is in the Help Manual under:

  • Reference
    • Developer and Advanced User Reference
    • SQL Queries

The SQL Queries topic has a section called SQL Language Support, where all supported clauses are listed.

In order to get the table you want, you will probably need to write a FlexScript function that reads the first table to produce the second.

· 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.

asb.p avatar image asb.p commented ·

Thanks for the reply...!

Is there any way/workaround to PIVOT the transaction table in to a Matrix table. I didnt able to come up with any SQL comment which can do that.

Thanks,

Praneeth.

0 Likes 0 ·

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.