Forum Replies Created

Viewing 3 posts - 1 through 4 (of 4 total)

  • RE: what is wrong in query??

    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...

  • RE: what is wrong in query??

    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 '...

  • RE: what is wrong in query??

    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...

Viewing 3 posts - 1 through 4 (of 4 total)