variable used for "CREATE TABLE"
Posted in 1997
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hi all,
This might be a stupid question, but after having read the manuals, etc.. I
can't find the answer..
I am modifying a 4GL application that prints a report.
To print this report, the application creates a table (Not a TEMP table)
and it's index. This table is then used to hold data to be processed for
this report. When the program ends, the table is destroyed.
My problem is that I want the program to be useable by more than one person
at a time. I would like to be able to check if the table exists already
because user1 is running the application.. If it's running, then I would
use another table name for user2, user3, and so on.
I should be able to use a variable instead of hard-coding the table name in
the create statement.
example: LET table_name = "my_table"
LET index_variable = "i_my_table"
CREATE TABLE table_name
...
...
CREATE UNIQUE INDEX index_variable ON table_variable
...
Thank you
Gerard Godin, for Marc Beauvais