Select in Select
Hi ,
i have a table that contains names of other tables - and i want to perform complex select like this one :
alter PROCEDURE SearchByType( @keyword nvarchar(100) , @typeID int)
as
select * from (select type from order_types where order_type_id=@typeID) t
But the problem is that it selects the inner table (the table that contains names of tables) - but i want to select from table that is parameter.
Is there a solution?A
|