title: Executing a stored procedure to insert records into a table - SQL Server 2000
body: <p>I'm working in SQL Server 2000. The following query is not working</p>
  
  <pre><code>declare @TempAccountKey Table (AccKey int,SitName varchar(1000),SitKey int) 
  insert into @TempAccountKey(AccKey,AccName) 
  exec [usp_Get_AccountForUser] @UserName 
  </code></pre>
  
  <p>It is throwing the error</p>
  
  <p><em>EXECUTE cannot be used as a source when inserting into a table variable.</em></p>
  
  <p>Any ideas?</p>
  
  <p><strong>#1</strong></p>
  
  <hr>
  
  <p>The linked server is properly set up. If i execute the following query</p>
  
  <pre><code>exec [ABC-SQL-PROD.DBabc.dbo.usp_Get_ABCForUser]
  </code></pre>
  
  <p>it is showing the error 'Could not find stored procedure'.</p>
  
  <p>Any ideas?</p>
  
  <p>NLV</p>