[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Dynamic Table Names



Greeting,
Is there a way in SQR to build table names dynamically and then reference
them?  For example the following snippet of code *does not* work:

                                MOVE 'database_name'  TO $db_name
                                MOVE 'table_name TO $table_name

                                STRING $db_name '..' $table_name BY '' INTO
$table

                                BEGIN-SQL

                                   CREATE TABLE $table ( col1  char(3)  not
null,  ... )

                                END-SQL


The error I get is:
                                (SQR 5528) Sybase DBRESULTS error in cursor
1:
                                   (102) Incorrect syntax near '@__p1'.


                                Error on line 19:
                                   (SQR 3735) Could not execute SQL.

                                SQR: Program Aborting.

Thanks!