title: Suppressing message 208 on SQL
body: <p>I'm using a query to get a specific results (from where clause) from all databases on a server:</p>
  
  <pre><code>  sp_msforeachdb  'select * from [?].dbo.[table] where field=''666'''
  </code></pre>
  
  <p>I have around 10 databases that contains this table I'm searching... but when I use this query it also looks into <code>tempdb</code>, <code>master</code> and other databases that do not contain this table.</p>
  
  <p>So it will return:</p>
  
  <blockquote>
    <p>Msg 208, Level 16, State 1, Line 1
    <br>Invalid object name 'master.dbo.table.</p>
  </blockquote>
  
  <p>I want to supress this message... I tried <code>set nocount</code>, <code>@@error &gt; 0</code>, <code>goto</code>, <code>ansi_warnings</code>.</p>