?
Solved

SQL SERVER - Convert varchar to numeric 6.2

Posted on 2013-06-20
4
Medium Priority
?
8,021 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 1000 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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

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

SQL Server engine let you use a Windows account or a SQL Server account to connect to a SQL Server instance. This can be configured immediatly during the SQL Server installation or after in the Server Authentication section in the Server properties …
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

770 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