Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2005 > SQL Server 2005
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 12th, 2007, 01:28 PM
Registered User
 
Join Date: Jul 2007
Location: Rio de Janeiro, Rio de Janeiro, Brazil.
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?

Reply With Quote
  #2 (permalink)  
Old July 12th, 2007, 03:05 PM
Friend of Wrox
 
Join Date: May 2006
Location: Helsingborg, , Sweden.
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!


Reply With Quote
  #3 (permalink)  
Old July 12th, 2007, 05:46 PM
Registered User
 
Join Date: Jul 2007
Location: Rio de Janeiro, Rio de Janeiro, Brazil.
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?

Reply With Quote
  #4 (permalink)  
Old July 13th, 2007, 02:29 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
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
Reply With Quote
  #5 (permalink)  
Old July 13th, 2007, 08:03 AM
Friend of Wrox
 
Join Date: May 2006
Location: Helsingborg, , Sweden.
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Please post full DDL for table.


Reply With Quote
  #6 (permalink)  
Old July 13th, 2007, 08:08 AM
Registered User
 
Join Date: Jul 2007
Location: Rio de Janeiro, Rio de Janeiro, Brazil.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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



Reply With Quote
  #7 (permalink)  
Old July 14th, 2007, 08:46 AM
Friend of Wrox
 
Join Date: May 2006
Location: Helsingborg, , Sweden.
Posts: 246
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Do you mind posting the fun?


Reply With Quote
  #8 (permalink)  
Old July 14th, 2007, 12:34 PM
Registered User
 
Join Date: Jul 2007
Location: Rio de Janeiro, Rio de Janeiro, Brazil.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 01:29 PM.


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