SQL Linked Server Column Names

  • Hi,

    I have a very weird situation in my SQL Server instance that I'm hoping someone might know something about. I am using an ODBC driver and a linked server to connect to a non-SQL database.

    When I query a table using a simple ODBC query tool, the column names I've specified are returned, which is what I expect.

    When I query a table using the ODBC driver set up as a linked server in SQL Server, I get the "friendly" name of the column--essentially the text that's in its decription field.

    For example:

    SELECT FIRST_NAME FROM PERSON is returning "First Name" in SQL Server (and what I want is "FIRST_NAME" to be the column header).

    The only place I've seen the columns names get automatically changed is in this one SQL Server instance, so I have to imagine it's something with the linked server or Openquery/exec or something else.

    Any ideas?

    Thanks,

    Mike

    Mike Scalise, PMP
    https://www.michaelscalise.com

  • Sounds strange! what if you specify what you want the column name to be returned as? ie

    select FIRST_NAME "FIRST_NAME" from ...

  • The query executes succesfully but the column header still displays the wrong name.

    Mike Scalise, PMP
    https://www.michaelscalise.com

  • what type of db is the non sql db

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

You must be logged in to reply to this topic. Login to reply