Unanswered: Sybase create tables dynamically from values of variables ( tricky )
I am trying to code something that needs dynamic generation of tables. So in the stored proc, i will query a config table and get the name of the table that needs to be created ... something like ..
delcare @name varchar(30)
select @name=name from config
create table @name --> just example, this doesn't work anyway.
so how do i achive this?
Also i need to create that table with column names from a resultset rows.
Select column_name, column_type from column_config
--suppose above query returns 10 rows, then my table need to have these 10 columns..
Let me know if you need more info. Need to resolve ASAP so please advice if you have done it in the past. Thanks a ton in advance.