title: String truncation, ANSI_WARNINGS OFF
body: <p>Using SQL Server 2008 (R2).
  I have two tables in different databases (with same # of columns and datatypes -  but different sizes)
  . I'm inserting values from one to another, - but the problem is that the source table has say: nvarchar(200) and the destination table has a field of type nvarhchar(100). 
  And there is data in the source table with larger fields than 100 characters, so the error:</p>
  
  <pre><code>*String or binary data would be truncated is thrown.*
  </code></pre>
  
  <p>I tried using the </p>
  
  <pre><code>-- SourceServer is passed in at command prompt (batch)
      SET ANSI_WARNINGS OFF
      GO
  
      INSERT INTO DestinationTable(col1, col2,...) 
      SELECT col1, col2, ... 
      FROM $SourceServer.dbo.SourceTable 
  
      SET ANSI_WARNINGS ON
      GO
  </code></pre>
  
  <p>This is however, throwing an error which looks like this:
  "<em><code>INSERT failed because the following SET options have incorrect settings: 'ANSI_WARNINGS'. Verify that SET options are correct for use with indexed views and/or indexes on computed columns and/or filtered indexes and/or query notifications and/or XML data type methods and/or spatial index operations.</code></em>"</p>
  
  <p>Any ideas on how I can fix this? </p>