|
database
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
SQL dynamique table name and column name as variable - ProblemI have a question. Is it possible to pass the table name and column name as variables like this : DECLARE @table sysname DECLARE @tableID int DECLARE @COLNAME varchar (200) SET @tableID = 196532963 SET @table = dbo.UDF_TABLE_NAME (@tableID) SELECT @COLNAME = dbo.udf_select_colname(tag) FROM @table select @colname I had problem with the table name Server: Msg 137, Level 15, State 2, Line 9 Must declare the variable '@table'. Any Suggestions? Ina |
|||||||||||||||||||||||