|
Home > Archive > microsoft.public.sqlserver.server > December 2002 > Truncate instead of Runtime
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Truncate instead of Runtime
|
|
|
| Hi, I guess I like to ask questions. Hopefully, this is
last one for sometime. I will try to answer some questions
when time comes. Suppose there is a table: Table1(Col1
vachar(2) Null). If an insert statement: Insert Into
Table1 values('XXX'). The insert will be aborted in SQL-
2000. However, in SQL-6.5, XX will be inserted to Table1.
Is there a server setting allowing truncated insert or
update intead of abort? Thank you
| |
| Tibor Karaszi 2002-12-20, 5:23 am |
| You mean truncated strings?
Check out SET ANSI_WARNINGS (although I suggest you fix the data instead):
CREATE TABLE t(a char(3))
INSERT t values('asds')
GO
SET ANSI_WARNINGS OFF
GO
INSERT t values('asds')
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=...ublic.sqlserver
"Joe" <hdszfeng@aol.com> wrote in message news:003201c2a785$d3237340$d5f
82ecf@TK2MSFTNGXA12...
> Hi, I guess I like to ask questions. Hopefully, this is
> last one for sometime. I will try to answer some questions
> when time comes. Suppose there is a table: Table1(Col1
> vachar(2) Null). If an insert statement: Insert Into
> Table1 values('XXX'). The insert will be aborted in SQL-
> 2000. However, in SQL-6.5, XX will be inserted to Table1.
> Is there a server setting allowing truncated insert or
> update intead of abort? Thank you
|
|
|
|
|