string truncation without error?

  • we recently did an upgrade from 2000 to 2005 sp1. we have a statement that throws an error in 2005 stating string data would be truncated. this is expected as the data is too long to fit in the column we are trying to insert. the strange thing is that when we run it on our old 2000 server, it inserts the row, truncating the string, and not throwing an error that a truncation occurred. is there a setting that tells sql to go ahead and truncate the string and not throw an error?

  • See SET ANSI_WARNINGS in Books Online, I believe that may be your problem/solution.

  • That is it - couldn't remember what that setting was for the life of me - Thanks

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply