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)

2005-11-02 (first published: )

184 reads

Blogs

Truncating very large transaction log in full recovery mode

By

While I always configure transaction log backups for every database in non-simple recovery model,...

Autonomous Driving Around London

By

There’s a video of Bill Gates taking a drive in an autonomous car around...

Best way to monitor high worker thread on SQL Server

By

It is common to see high worker count issue on the production server and...

Read the latest Blogs

Forums

predictive query plan

By Arsh

Dear Friends, Please advise if there is a way to get a query plan...

Significance of Historical waits report in SQL server Performance dashboard

By IT researcher

I have the following historical wait report for my SQL server. I have noticed...

Has SQL Server Performance Improved?

By Steve Jones - SSC Editor

Comments posted to this topic are about the item Has SQL Server Performance Improved?

Visit the forum

Ask SSC Logo Ask SSC

SQL Server Q&A from the SQLServerCentral community

Get answers