Technical Article

TextToDecimal

SUMMARY:This UDF script takes a text value(nvarchar) and returns a decimal(18,6) number. If the text value can't be interpreted as numeric, the UDF returns NULL.-----------------------------------------------USAGE: SET @MyDecimal = dbo.TextToDecimal('-$123,456.73')@MyDecimal will now be -123456.730000SET @MyDecimal = dbo.TextToDecimal('-$123,4560.73') --bad number format@MyDecimal will now be NULL------------------------------------------------------DESCRIPTION:The ISNUMERIC function incorrectly returns 1 (True) for many non-numeric text values. Even […]

5 (1)

You rated this post out of 5. Change rating

2005-11-02 (first published: )

188 reads

Blogs

T-SQL Tuesday #178–A Recent Technical Problem

By

This month we have a good invitation from Deepthi Goguri, where she asks us...

WordPress.com and Developers: Roadmap Update

By

Where we've been and where we're going.

Redgate Clone Graduating Images

By

I wanted my own custom image in our internal Redgate Clone cluster, so I...

Read the latest Blogs

Forums

GIT Configuration and Automated Release for Azure Data Factory

By Sucharita Das

Comments posted to this topic are about the item GIT Configuration and Automated Release...

How to Add a New Shared Disk to a WSFC as a SQL Resource

By muhkam

Comments posted to this topic are about the item How to Add a New...

Capture long transact query using SQL Server performance condition alert feature

By pcq0125

I created a SQL Alert trying to capture long query transaction under the  SQL...

Visit the forum

Question of the Day

Adding Features During a SQL Server 2022 Upgrade

I have a SQL Server 2016 SP3 instance that I want to upgrade to SQL Server 2022. I don't have replication installed, but I want to enable this on SQL Server 2022. Can I add replication during the in-place upgrade?

See possible answers