Variables and Table Names
Posted: Sun Oct 18, 2015 8:33 pm
I'm having fits trying to create a table using a variable for its name. I have several truncated layers of storage in my app and need the program to generate unique names for each table, but I'm struggling to get it to work. I can get them to run if I define the table names, but if I set the same names in variables and use the variable to call the unique name for the new table in the database it doesn't execute the SQL.
"CREATE TABLE IF NOT EXISTS "&variableTbName&" (column1, column2,..etc);" into tSQL
I've keyed the exact same thing with the actual name I want to use and it works fine. I can't seem to figure out why it isn't working with the variable...help...
"CREATE TABLE IF NOT EXISTS "&variableTbName&" (column1, column2,..etc);" into tSQL
I've keyed the exact same thing with the actual name I want to use and it works fine. I can't seem to figure out why it isn't working with the variable...help...