Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 145425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T08:25:16+00:00 2026-05-11T08:25:16+00:00

Assuming the following data: Column1 (data type: varchar(50)) ——– 11.6 -1 1,000 10 Non-Numeric

  • 0

Assuming the following data:

Column1 (data type: varchar(50)) -------- 11.6 -1 1,000 10'     Non-Numeric String 

I have a query, which is pulling data from this column and would like to determine if the value is a number, then return it as such in my query. So I am doing the following

SELECT CASE        WHEN IsNumeric(Replace(Column1, ''', '')) = 1 THEN Replace(Column1, ''', '')        ELSE 0    END AS NumericValue 

SQL is reporting back:

Conversion failed when converting the varchar value ‘11.6’ to data type int.

Why? I have also tried to force cast this:

SELECT CASE        WHEN IsNumeric(Replace(Column1, ''', '')) = 1 THEN cast(Replace(Column1, ''', '') AS float)        ELSE 0    END AS NumericValue 

And I got:

Error converting data type varchar to float.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. 2026-05-11T08:25:17+00:00Added an answer on May 11, 2026 at 8:25 am

    You need to replace comma with a period:

    CAST(REPLACE(column, ',', '.') AS FLOAT) 

    SQL Server outputs decimal separator defined with locale, but does not unterstand anything but a period in CASTs to numeric types.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 69k
  • Answers 69k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer Take a look at HttpClient May 11, 2026 at 12:33 pm
  • added an answer Just do a Replace in Files from the Search menu,… May 11, 2026 at 12:33 pm
  • added an answer This purely depends on the type of application you are… May 11, 2026 at 12:33 pm

Related Questions

Assuming the following class stub: public class Foo<T> { private Class<T> type; public Foo<T>
Assuming the following directory structure, htdocs/ images/ css/ .htaccess system/ index.php ... I would
I have some thread-related questions, assuming the following code. Please ignore the possible inefficiency
Assuming a Read Committed Snapshot transaction isolation setting, is the following statement atomic in
Assuming the you are implementing a user story that requires changes in all layers
Assuming the following data: Column1 (data type: varchar(50)) -------- 11.6 -1 1,000 10 Non-Numeric
We're writing a records management product for schools and one of the requirements is
I have a large result set assembled in a parent/child relationship. I need to
I'm trying to unpickle an object stored as a blob in a MySQL database.
I'm trying to wire-up LinqToSql to be my data access layer and running into

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.