February 13, 2007 at 5:18 pm
I need to make a column in a table char(200) instead of char(300). I think the syntax for altering a column is pretty straightforward, but what I am running into is a data truncation problem. The user doesn't care if the data is truncated or not, but MSSQL does, and it won't continue if it thinks that it might truncate something.
How do I get around this?
Thanks
February 13, 2007 at 6:57 pm
UPDATE dbo.YourTable SET Colname = LEFT(ColName, 200)
ALTER TABLE dbo.YourTable
ALTER COLUMN ColName CHAR(200)
February 13, 2007 at 8:25 pm
Thanks a lot. That worked.
February 14, 2007 at 8:53 pm
or on a per-session basis-
SET ANSI_WARNINGS
Specifies SQL-92 standard behavior for several error conditions.
SET ANSI_WARNINGS { ON | OFF }
SET ANSI_WARNINGS affects these conditions:
The systems fine with no users loggged in. Can we keep it that way ?br>
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply