Home Forums SQL Server 2008 T-SQL (SS2K8) Turn negative numbers into 0 RE: Turn negative numbers into 0
Paul White
SSC Guru
Points: 150467
More actions
July 18, 2011 at 9:34 pm
#1354600
The Dixie Flatline (7/18/2011)And also...select (ABS(@test)+@test)/2 as result
The Dixie Flatline (7/18/2011)
select (ABS(@test)+@test)/2 as result
Neat!
Paul WhiteSQLPerformance.comSQLkiwi blog@SQL_Kiwi