Solved

SQL SERVER - Convert varchar to numeric 6.2

Posted on 2013-06-20
4
6,925 Views
Last Modified: 2016-10-01
How do I convert a varchar to a numeric 6,2

"50.00"
"100.00"

I tried cast but get ...

Msg 8114, Level 16, State 5, Line 2
Error converting data type nvarchar to numeric.
0
Comment
Question by:JElster
4 Comments
 
LVL 8

Expert Comment

by:didnthaveaname
ID: 39263393
Can you post your query so we can see the details?  Thanks!
0
 
LVL 1

Author Comment

by:JElster
ID: 39263423
UPDATE revenue SET PERCENTAGE = CAST([PERCENT] AS NUMERIC(6,2))
0
 
LVL 32

Accepted Solution

by:
ewangoya earned 250 total points
ID: 39263428
Use convert

SELECT   CONVERT(numeric(6, 2), column)
from Table
WHERE  ISNUMERIC(column) = 1
0
 

Expert Comment

by:marlon espanola
ID: 41824540
cc03e747a6afbbcbf8be7668acfebee5 can you convert this to numeric? please .... thanks
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

This is basically a blog post I wrote recently. I've found that SARGability is poorly understood, and since many people don't read blogs, I figured I'd post it here as an article. SARGable is an adjective in SQL that means that an item can be fou…
There have been several questions about Large Transaction Log Files in SQL Server 2008, and how to get rid of them when disk space has become critical. This article will explain how to disable full recovery and implement simple recovery that carries…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

705 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now