Column occurrence_limit is money datatype,
If it is NULL I want just empty string (''), but it gives me 0.00.
ISNULL(occurrence_limit,'') as occurrence_limit
How can I simply have '' instead of 0.00?
As others have said, don't do it. But if you need to:
SELECT ISNULL(CONVERT(VARCHAR(9), occurrence_limit), '') AS occurrence_limit
'100' is less than '2', for example, and '17' + '2' is '172'.DROP table #testStak create table #testStak(nombre varchar(50),moneycant money)
INSERT INTO #testStak VALUES ('ALFA',10)
INSERT INTO #testStak VALUES ('BETA',NULL)
INSERT INTO #testStak VALUES ('GAMMA',5000)
SELECT nombre,ISNULL(CAST(moneycant AS varchar),'') FROM #testStak
money. Why not just usenull?''is not a number, so it can't be stored as amoneyvalue, and it's implicitly converted to0. You most certainly don't want to treat your numbers as avarchar(as I can assure you that100is greater than2, not less than it) so leave it as it is.NULLthey show an empty "cell", so what ever ETL process you are using is actually putting "NULL". Fix the ETL process. It's only really IDEs that tend to displayNULL, as it is different to''when dealing with strings.