Solved

SQL SERVER - Convert varchar to numeric 6.2

Posted on 2013-06-20
4
7,522 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:
Ephraim Wangoya 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Suggested Solutions

     When we have to pass multiple rows of data to SQL Server, the developers either have to send one row at a time or come up with other workarounds to meet requirements like using XML to pass data, which is complex and tedious to use. There is a …
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

733 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