home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 17,824 of 19,505   
   Erland Sommarskog to gofyself@wrong.address.com   
   Re: Basic advice required   
   27 Jun 10 16:56:45   
   
   From: esquel@sommarskog.se   
      
   lk (gofyself@wrong.address.com) writes:   
   > Therefore I had already verified that it gave me an error (invalid object)   
   > before I posted.   
      
   In your original post you said that the error was "invalid syntax near .".   
   There are situations when you can get syntax error in one database, but   
   not another, when the databases has different compatibility settings. But   
   I could not see that your query could have this effect.   
      
   Now you present a different error message: "invalid object", which casts   
   the problem in an entirely different light. You are simply running the   
   query from the wrong database. In the toolbar in Mmgt Studio there is a   
   dropdown where you can select which to database to work from. You can   
   also change the current database with the USE command:   
      
      USE AdventureWorks   
      go   
      
   In the future, make the habit to always post error messages in verbatim.   
   Thereby you can avoid this kind of confusion.   
      
      
   --   
   Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se   
      
   Links for SQL Server Books Online:   
   SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx   
   SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx   
   SQL 2000: http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca