Viewing 3 posts - 1 through 4 (of 4 total)
Thanks Rob and to all who put their brains to work for my sake.
As indicated by Rob, I wanted to show the table name in the results.
Purpose of the exercise...
May 23, 2005 at 1:49 am
#560434
Thanks, Paul. That works fine. Taking your clue further I wrote as:
USE NORTHWIND
DECLARE @tablename SYSNAME
SET @tablename = 'EMPLOYEES'
1. SELECT @tablename , E.EMPLOYEEID FROM EMPLOYEES E
2. EXEC ('SELECT E.EMPLOYEEID FROM '...
May 22, 2005 at 2:26 am
#560396
I am searching for tables where a given field used through following query
use Northwind
DECLARE @FieldName VARCHAR(15)
SET @FieldName = 'EmployeeID'
SELECT O.name AS FROM dbo.sysobjects O
INNER JOIN dbo.syscolumns C ON...
May 19, 2005 at 3:38 am
#559794