Linked Server Naming Issue?

  • Hi all,

    Trying to set up my first linked server. All our servers have a naming convention of "Site"-"production"-"Software"-"number" so a sql box would be something like Site1-DV-SS-01

    When i set up the linked server i tried to run: select * from Site1-DV-SS-01.Database.Schema.Table but i get an error of Msg 102, Level 15, State 1, Line 1

    Incorrect syntax near 'Site1-DV-SS-01'.

    Have i fallen into a trap? or am i using the syntax wrong.. I was following along to the vid by Andy Warren.

    Thanks

    S

  • You'll need to look at the syntax when working with dashes in text:

    select * from [Site1-DV-SS-01].[Database].[Schema].[Table]

    Try this.

    -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    This thing is addressing problems that dont exist. Its solution-ism at its worst. We are dumbing down machines that are inherently superior. - Gilfoyle

  • simple and effective!

    thanks sorted it..

    S

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

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