Hi,
im using a variable to change the table name of an application in its sql connection settings. and it’s working.
However, I also have other sql select commands in different events of the application and some part of the table name of these other select commands are the same with the table name of the application. To illustrate:
[TABLE=“cellpadding: 0, cellspacing: 0”]
[TR]
[TD] [/TD]
[TD]“Variable name used for replacing the table name.
Please indicate the name of the table that will be replaced by the variable value.”[/TD]
[/TR]
[/TABLE]
Form app table name:
sample
Variable:
var_table_name
Name of the table that will be replaced:
sample
to put value in the variable:
[var_table_name] = ‘new_table’;
Other SQL commands:
sc_exec_sql(“SELECT id FROM sample_only WHERE id > 1”);
sc_exec_sql(“SELECT name FROM sample_again”);
Effect to the Other SQL commands:
sc_exec_sql(“SELECT id FROM new_table_only WHERE id > 1”);
sc_exec_sql(“SELECT name FROM new_table_again”);
Here, you can see the Effect to the Other SQL command where the table name of the sql command is also affected by the change of table name when it’s not supposed to be. Only the table name of the application should be changed and it should not affect the other sql commands used in different events in the app.
[ATTACH=JSON]{“data-align”:“none”,“data-size”:“medium”,“data-attachmentid”:88560}[/ATTACH]