I am working with price lists, and am trying to add a £ to the start of my values. This is being required from an Oracle 11g database.
to_char('£' + (case when web_cost.cost is null then 0 else
round(web_cost.cost,2) end)) as unitcost
web_cost.cost should produce values in the following format; 11.50, or 0 or null values possibly.
The above query is giving me invalid number error, I have even tried to_char on every section of this code, and have still had no luck.
This is the only section of my query that currently does not work, any ideas?
||. Also, hardcoding '£' is not a good practice - try to get it dynamically (from another table or somewhere else), as when you run this code for a client using a different currency, you will hardcode it again etc.