Re: Cropping data

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 05/19/04


Date: Wed, 19 May 2004 08:35:30 +0200


> Also, you should get a warning/error if you try to enter data that is too
> big for a column:

Unless you SET ANSI_WARNINGS OFF. (Not something I recommend).

-- 
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Louis Davidson" <dr_dontspamme_sql@hotmail.com> wrote in message
news:eGM1gvOPEHA.1392@TK2MSFTNGP09.phx.gbl...
> Also, you should get a warning/error if you try to enter data that is too
> big for a column:
>
> create table test
> (
>  testId  int primary key,
>  value   varchar(10)
> )
> go
> insert into test
> values (1, '1234567890123')
> go
>
> This returns:
>
> Server: Msg 8152, Level 16, State 9, Line 1
> String or binary data would be truncated.
> The statement has been terminated.
>
> -- 
> ----------------------------------------------------------------------------
> Louis Davidson (drsql@hotmail.com)
> Compass Technology Management
>
> Pro SQL Server 2000 Database Design
> http://www.apress.com/book/bookDisplay.html?bID=266
>
> Note: Please reply to the newsgroups only unless you are
> interested in consulting services.  All other replies will be ignored :)
>
> "John McGinty" <jpmcginty@talk21.com> wrote in message
> news:OOA1wkNPEHA.1048@tk2msftngp13.phx.gbl...
> > Thanks very much. Very useful to know.
> >
> > john
> >
> >
> >
> > *** Sent via Developersdex http://www.developersdex.com ***
> > Don't just participate in USENET...get rewarded for it!
>
>