In Sql server, i am trying to write a query, if the value is less than zero i want to show ” < 0 ” other wise the same value. For this i wirte a simple query Like This :
I know it is giving conversion erro but can you help in this.
declare @ret decimal = 0.25
select (case when @ret <0 then '< 0' else @ret end) as colum
Try this, pay attention on precision modifiers about decimal