I would like to be able to dynamically change database name in stored procedures / views.
Example:
SELECT USER_FNM
FROM MYBASE_01.DBO.USERS
I would like to have MYBASE_01
dynamic, perhaps stored in some variable. Is this possible?
My reason for this is I have many views where database name is included. With deploying, I must change this name in every view. It would be much easier if databases name can be stored only in one variable, so there is no need to change it for all views.