Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
|
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 12th, 2007, 01:28 PM
Registered User
 
Join Date: Jul 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Out of range values stored in tinyint column

Hello,

I am facing a puzzle here. A SQL Server 2005 database using UNICODE collation allows values outside of the defined range of tinyint data type: 376, 304.

Does database collation actually exact numeric datatypes by doubling their storage and increasing their range?

 
Old July 12th, 2007, 03:05 PM
Friend of Wrox
 
Join Date: May 2006
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Collation is not even considered for numeric datatypes.
A string can contain any number!


 
Old July 12th, 2007, 05:46 PM
Registered User
 
Join Date: Jul 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

That is what I thought. This is my only working theory at the moment. Any other explanations? How can a tinyint column store out of range values?

 
Old July 13th, 2007, 02:29 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Interesting!!!... Boris, Can you post us here the exact collation that you used for the database? I dont think there is any collation in the name of UNICODE... going by this - SQL Server 2005 Books Online - Selecting a SQL Collation I am trying to reproduce that on mine.

_________________________
- Vijay G
Strive for Perfection
 
Old July 13th, 2007, 08:03 AM
Friend of Wrox
 
Join Date: May 2006
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Please post full DDL for table.


 
Old July 13th, 2007, 08:08 AM
Registered User
 
Join Date: Jul 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Issue resolved. A practical joke by a collegue... Very funny



 
Old July 14th, 2007, 08:46 AM
Friend of Wrox
 
Join Date: May 2006
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Do you mind posting the fun?


 
Old July 14th, 2007, 12:34 PM
Registered User
 
Join Date: Jul 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

No, I just don´t care to. Nothing special, just some fake printouts






Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding Column Range Nocturnl Excel VBA 3 December 29th, 2007 11:36 AM
Filter grid view results by range of values srinredd59 ASP.NET 2.0 Professional 0 December 27th, 2006 03:55 PM
including unique values from a range into a combo Kaustav Excel VBA 0 November 6th, 2006 09:17 AM
find name and define range for Column qball Excel VBA 4 November 17th, 2004 03:55 PM
binding an tinyint to a CheckBox control... ShadowMoon ADO.NET 0 October 26th, 2004 05:55 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.