Toby Harman
SSCarpal Tunnel
Points: 4168
More actions
September 14, 2010 at 4:39 pm
#1221061
Nice use of REPLACE... shoulda thought of that!
Patrick Dadey
Grasshopper
Points: 11
June 4, 2019 at 10:05 pm
#3650265
For SQL Server 2012 onwards simplest solution is to use TRY_PARSE.
DECLARE @NegativeNumeric varchar(100);
SET @NegativeNumeric='50.10-';
SELECT "Value" = TRY_PARSE(@NegativeNumeric AS DECIMAL(10,2));
Viewing 2 posts - 16 through 16 (of 16 total)
You must be logged in to reply to this topic. Login to reply