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
Solved

SQL SERVER - Convert varchar to numeric 6.2

Posted on 2013-06-20
4
7,392 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

I have written a PowerShell script to "walk" the security structure of each SQL instance to find:         Each Login (Windows or SQL)             * Its Server Roles             * Every database to which the login is mapped             * The associated "Database User" for this …
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

808 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