title: Export records from SQL Server 2005 express edition
body: <p>I have a little problem. My friend has a database with over 10 tables and each table has over 90-100 records.</p>
  
  <p>I can't find a workaround to export the records (to put in a SQL file something like this: <code>INSERT INTO .... VALUES ...</code> for each existing records) from his tables to import in my database.</p>
  
  <p>How to do that ?</p>
  
  <p>I tried: right click on a table -> <code>Script Table as -&gt; INSERT TO -&gt; File ...</code></p>
  
  <p>but it only generate the <code>INSERT</code> statement.</p>
  
  <p>There are a solution ? or this feature is only for commercial version ?</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>You can use BCP command with command prompt like this</p>
  
  <p>For export: <code>bcp ADatabase.dbo.OneTable out d:\test\OneTable.bcp -c -Usa -Ppassword</code>
  For import: <code>bcp ADatabase.dbo.OneTable in d:\test\OneTable.bcp -c -Usa -Ppassword</code></p>
  
  <p>these commands will create a BCP file which contains records for specified table. You can import using existing BCP file into another database</p>
  
  <p>If you use remote database then:</p>
  
  <pre><code>bcp ADatabaseRemote.dbo.OneTableRemote out d:\test\OneTableRemote.bcp -Slocalhost/SQLExpress -Usa -Ppassword
  </code></pre>
  
  <p>Instead of <code>localhost/SQLExpress</code>, you can use <code>localhost</code> or other server name...</p>