[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 226
  • Last Modified:

silly question re DECIMAL

what is the EXACT  decimal value for '100', or 100 % ?
0
dbaSQL
Asked:
dbaSQL
  • 4
  • 2
1 Solution
 
dbaSQLAuthor Commented:
more detail, they need to write a 'percentage' value to a table.  having all sorts of problems w/the datatype (decimal(5,3)

0
.50
1
10.25
50
75.9
100


just looking for the best way to define the attribute
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
> (decimal(5,3)
it should be decimal(6,3 )
0
 
Aneesh RetnakaranDatabase AdministratorCommented:
decimal (5,3) can store upto 99.999 while decimal (6,3) can store upto 999.999
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
dbaSQLAuthor Commented:
and the correct way for them to give me 100 ?  (100 %)
0
 
dbaSQLAuthor Commented:
just 100, right?

declare @1 = decimal(6,3)
set @1= 100
select @1  = '100.000'

yes?
0
 
dbaSQLAuthor Commented:
yep.   thank you, aneesh
0

Featured Post

NEW Veeam Backup for Microsoft Office 365 1.5

With Office 365, it’s your data and your responsibility to protect it. NEW Veeam Backup for Microsoft Office 365 eliminates the risk of losing access to your Office 365 data.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now