Passing variable to create table command
KersApr 8 2004 — edited Apr 8 2004Is it possible to pass a varaiable to the create table command.
At each yearend we have to manually create copy tables of the years data these are held as table_name_2002 etc. The original table only holds the current years data. We would like to create a script to create all these, along the lines of
CREATE TABLE table_name_||'&year'
AS
SELECT * FROM table_name;
As his is run every year we would like to be able to run the same script, and just pass in the year each time.
however i cannot get this to work, is there another way round this?
Thanks