parametrize server and database name in t-sql -
is possible paramterize sql server name , database name when changed dont have change 1 line ?
thanks help
your question isn't clear - i'm interpreting this: like:
select (list of fields) @database.dbo.@tablename (clause)
or - right?
no, cannot - @ least not in standard sql - you'd have use dynamic sql (string sql command variable, , execute that).
if think going there - must read erland sommarskog's excellent the curse , blessings of dynamic sql , think again if want use it.
Comments
Post a Comment