Syntax error near ''.''

  • Hi,

    I ran the command such as 'select * from Edgars test.dbo.tablename'. It returns the error message 'Synatx error near '.'.

    There is a database called "Edgars test".

    It seems that the T-sql won't accept the space between Edgard and test.

    How can it be overcome?

    Thank you

    Michael

  • #1.  you need to put [Edgars test].dbo.

    #2.  In future I would not allow developers (or whomever) to create objects with spaces in them for this reason... (Tables, SPs, columns, etc...)



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

  • Believe me, this is a pain in the @$$ on the long term, and the short term. In any term, don't do it .

  • He's just lucky the creator didn't try an apostrophe in Edgar's

  • That would just be torture .

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

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