I've created a view from a table where I replace all the 0 value to null using decode(). When I execute the CREATE VIEW command, it is fine. Even the SELECT statement is working fine. But when I try to query this view, its giving me a syntax error. But If I replace null to 0, it is working fine.

So, How can I create a view from a table where I want to replace all the 0 value to null?