• fawad.majid (11/25/2013)


    Hi There..

    I have 69 SQL DB servers and every server have identical tables but on three database when I am querying the table it populating the Application version in the column compare with other database servers which running the same table (most of them have the same information in the result) not populating the Application version information in the result

    can anyone tell me why it populating the application version in the result

    so you are saying in three specific databases, you get an additional column of data you were not expecting?

    sounds to me like someone modified the structure of the tables in those three databases, and added the data/applciation version to the table as well.

    the Answer, if it's not obvious to you yet, is to explicitly list the desired columns

    so instead of this:

    exec sp_msForEachDB 'SELECT * FROM [?].dbo.MyTableName;'

    --do this instead

    exec sp_msForEachDB 'SELECT Column1,Column2,OtherColumns FROM [?].dbo.MyTableName;'

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!