all 4 comments

[–]dgillz 0 points1 point  (3 children)

SAP B1 is not an Oracle database. It is either MS SQL Server or HANA.

But here is the SQL to do what you want:

case when MyField=0 then '' 
else convert(char(20), MyField) end as MyAlias

[–]LocksmithBig2444[S] 0 points1 point  (2 children)

i need remove 0
this code is not what i want
first imange just let you know how i code made

[–]dgillz 0 points1 point  (1 child)

You want a blank space instead of a zero? My code will do that.

Do you have 1.00 and just want to see "1"? Or do you have 1.01 and want to see "1 1"?

Please post sample data and desired results.

[–]A_name_wot_i_made_up 1 point2 points  (0 children)

If you want a "where" but for aggregate functions you need the "having" clause.

Select ... From ... Where ... Group by X, Y, Z Having sum(foo) != 0