We were trying to figure out a way of having a dynamically encoded database name in our sql queries for a series of reports working off two databases. We needed to have the second database on a different server and we wanted to replicate this on our development environment as well as making deployment easier.Continue reading “SQL Server: Linked Servers in a Development Environment”
Tag Archives: sql server
SQL Server: Find tables containing column name
To find all the user tables that contain a particular column name run the following command on the relevant database: SELECT name FROM sysobjects WHERE xtype=’U’ and id IN( SELECT id FROM syscolumns WHERE name like ‘%COLUMN NAME%’ )