nvarchar(255) to nvarchar(max) conversion issues

jumpmediajumpmedia Posts: 3
Hi, I have version 6.1.0.53 and we are converting nvarchar(255) columns to nvarchar(max). We were surprised when the compare reported that the column might be truncated, and also when it insisted on dropping the table and recreating it (Which causes us problems as the tables are replicated).
Is this expected behaviour, or functionality that can be improved?
Dave Needham.... Jump Media

Comments

  • The truncation warning is a bug we fixed in 6.2 - if you check for updates (on the help menu), you should get a message about this free point release and be able to download it.
    Software Developer
    Redgate Software
  • Yep, that warning is fixed.

    What would be great to get more clarity on is why the tables are being dropped rather than an alter column or new column and rename method being used.

    This is pertinent to us because we have replication set up, and recreating the table causes its GUID to change, hence breaking replication.
    Dave Needham.... Jump Media
  • The tables are being dropped and recreated because in SQL Server 2000, you couldn't ALTER COLUMN a varchar to a text field, and the same logic that we use to avoid trying to do that is triggering on the difference between a varchar(255) and a varchar(max).

    I've raised a bug about this, as SQL Server 2005 can cope with ALTER COLUMN between these types, and hopefully we can get it fixed in the next version.
    Software Developer
    Redgate Software
  • Eddie DEddie D Posts: 1,733 Rose Gold 5
    I am pleased to inform you that we have fixed this problem in the recently released SQL Compare V.7.

    If you have a valid Support & upgrades option, you can download SQL Compare V.7 using the 'Check for updates' mechanism (SQL Compare GUI ->Help ->Check for updates)

    or download using this link: HERE.

    SQL Compare V.7 will install along side any previous versions of the software.

    Many Thanks
    Eddie Davis
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: [email protected]
Sign In or Register to comment.