truncate columns

Compares and synchronizes SQL Server databases, backups and scripts.

Moderators: JonathanWatts, Chris Auckland, David Atkinson, eddie davis, Anu Deshpande, Michelle Taylor, alice.easey, james.billings, chengvoon.tong

truncate columns

Postby rick@abasoftware.com » Thu Jan 30, 2014 12:46 am

I am trying to update a sql db where the old version has varchar(MAX) columns and the new db has varchar(5000) column size. The script gives a message that data would be truncated and basically fails. I want it to truncate, how do I force the script to complete?

I saw somewhere where you can set Ansi warnings off, but I see no such setting.

Thanks,
Rick
rick@abasoftware.com
 
Posts: 1
Joined: Thu Jan 30, 2014 12:40 am

Postby Brian Donahue » Mon Feb 03, 2014 11:07 am

Hello,
There is no setting in SQL Compare to SET ANSI_WARNINGS OFF. You can save the script to disk, add the set statement to the top of the script, and run it using SSMS or sqlcmd.exe.

Hope this helps.
Brian Donahue
 
Posts: 6670
Joined: Mon Aug 23, 2004 10:48 am


Return to SQL Compare 10

Who is online

Users browsing this forum: No registered users and 0 guests