SQLTeam.com | Weblogs | Forums

IF a value is set as numeric(19,6),null) how to check if is null or not


I now how to check for a null value when the data type is (nvarchar(34),null).

MIN(CASE WCode WHEN '1A' THEN convert(varchar(72),isnull(U_BL, '')) END) AS '1A'

But when the data type is (numeric(19,6),null), how to check if the value is null similar to the above formula.

MIN(CASE WCode WHEN '1A' THEN ................... isnull(U_AC, '')) END) AS '1A'

Any help would be appreciated.

MIN(IsNull(U_AC, '')) AS 'A1'
1 Like

Hi Joseph,
I tried this
MIN(CASE WCode WHEN '1A' THEN IsNull(U_AC, '') END) AS '1A'

Get this error message:
Msg 8114, Level 16, State 5, Line 24
Error converting data type varchar to numeric


ISNULL(decimal_column, 0.0)

Post a created table or declare a table variable and provide insert statements please. You will give respondents the opportunity to provide a solution with working code. We're just guessing here.

Hi Joseph,

I found a solution for this Thanks very much for your help.