 |
| SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the SQL Server 2000 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
|
|
|
|

November 15th, 2004, 02:24 PM
|
|
Authorized User
|
|
Join Date: Jun 2004
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
How to change the length of "Money"
When I define my data type to "Money", the length 8 is shown automatically. I try to alter the length, but it is alter-disable.
I know "Money" is a data type which its domain fall within
-922,337,203,685,477.5808 to 922,337,203,685,477.5807
So, can any one tell me how the length of 8 can relate to the domain as mentioned above seeming that the length is alter-disable, and is there any way to alter it, if, there is the case.
|
|

November 15th, 2004, 03:11 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
With Money (and some other datatypes, like DateTime for example), the Length is not the length in number of characters, but in bytes.
SQL Server uses 8 bytes to store a Money datatype, resulting in the number you gave in your post.
Cheers,
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: trust by The Cure (Track 8 from the album: Wish) What's This?
|
|

November 15th, 2004, 04:02 PM
|
|
Authorized User
|
|
Join Date: Jun 2004
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I see... its 8 bytes...
So, it means that there is no way for me to alter the length (because 8 byte is at default), is it?
|
|

November 15th, 2004, 04:16 PM
|
 |
Wrox Author
|
|
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
|
|
Yes, AFAIK, that is correct. Money is money.... ;)
Why do you want to limit it??
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Down On The Street by Rage Against The Machine (Track 10 from the album: Renegades) What's This?
|
|

November 16th, 2004, 08:31 AM
|
|
Authorized User
|
|
Join Date: Jun 2004
Posts: 99
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
Ya, thank you so much,
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| make some money! |
pipeisawesome |
C++ Programming |
4 |
February 2nd, 2007 11:11 AM |
| Help even for money |
shemeri |
XSLT |
1 |
August 28th, 2005 12:10 PM |
| Money Format |
surendran |
Javascript |
0 |
March 30th, 2004 02:35 AM |
| This book is a waste of money |
tim2ok |
BOOK: ASP.NET Website Programming Problem-Design-Solution |
2 |
October 22nd, 2003 11:13 AM |
|
 |