How do I remove database name from SQL Server generated script?
- by bucha
Anytime I use 'script table as' - 'Insert To' (or other command), the script generated automatically places the database name in the script. Such as:
INSERT INTO [DatabaseName].[dbo].[tblToBeInserted] ...
While not a huge problem to just delete it, it has slipped by a few times and the script breaks if run on a different server with a different database name but has the same schema. (Such as running on [DatabaseName.Test])
Is there an option I can change, or can I modify the output in any way to remove this?