Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2012 Forums
 Transact-SQL (2012)
 decimal with sign
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Yak Posting Veteran

79 Posts

Posted - 03/27/2013 :  11:36:08  Show Profile  Reply with Quote
I need to store a decimal number (17 degits before decimal and 2 after )on a table with sign

What should be the datatype of the column
dicimal(17,2) does not store sign if +

Patron Saint of Lost Yaks

30421 Posts

Posted - 03/27/2013 :  11:51:13  Show Profile  Visit SwePeso's Homepage  Reply with Quote
The only datatype that will store the plus sign for you is CHAR or VARCHAR.
You also use VARBINARY or BINARY if you don't want the data to be humanly readable.

N 56°04'39.26"
E 12°55'05.63"
Go to Top of Page

Flowing Fount of Yak Knowledge

8781 Posts

Posted - 03/27/2013 :  11:52:19  Show Profile  Visit webfred's Homepage  Reply with Quote
1. decimal(19,2) if you need 17 and 2
2. You don't need to store that data formatted! Display format should be done in the front end when displaying the data.

Too old to Rock'n'Roll too young to die.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000