question

Enrique Elizaga avatar image
0 Likes"
Enrique Elizaga asked anthony.johnson converted comment to answer

What is wrong with my query?

Is the following code correct? I'm trying to pull a query result and dump it into a table called TEST:

Table RESULT = Table.query("SELECT * FROM [MANUF SCHEDULE], [ITEM MASTER] \
	WHERE [MANUF SCHEDULE.NODE ID] = 101 AND [MANUF SCHEDULE.DATE] = 11 AND \
	[MANUF SCHEDULE.SKU] = 121523");
RESULT.cloneTo(Table("TEST"));

If I wanted to make some values variable is this ok?

Table RESULT = Table.query("SELECT * FROM [MANUF SCHEDULE], [ITEM MASTER] \
	WHERE [MANUF SCHEDULE.NODE ID] = $1 AND [MANUF SCHEDULE.DATE] = $2 AND \
	[MANUF SCHEDULE.SKU] = $3",
	/*1*/ current.NODE_ID,
	/*2*/ Table("CONFIG")[1][2],
	/*3*/ index); 
RESULT.cloneTo(Table("TEST"));

Index is the counter for a cycle.

FlexSim 17.2.2
query
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

·
Mischa Spelt avatar image
2 Likes"
Mischa Spelt answered

I think you need to quote the table name and column name separately. So instead of

[MANUF SCHEDULE.NODE ID]

try

[MANUF SCHEDULE].[NODE ID]
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.