Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

SQL Data type

Posted on 2013-01-25
3
Medium Priority
?
329 Views
Last Modified: 2013-01-25
What is the proper data type to get
NNNNNNNN

to 4 decimal places
0
Comment
Question by:lrbrister
3 Comments
 
LVL 5

Accepted Solution

by:
RehanYousaf earned 1400 total points
ID: 38819193
SELECT CONVERT(DECIMAL(12,4),10000)

BTW if you provide an example and desired result ... it will help
0
 
LVL 70

Assisted Solution

by:Scott Pletcher
Scott Pletcher earned 600 total points
ID: 38819391
SELECT CAST(column_name AS decimal(12, 4))
FROM ...

or

SELECT CAST(hardcoded_value AS decimal(12, 4))
0
 

Author Closing Comment

by:lrbrister
ID: 38819434
Thanks
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Ready to get certified? Check out some courses that help you prepare for third-party exams.
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question