Categories
- All Categories
- 15 Oracle Analytics Sharing Center
- 16 Oracle Analytics Lounge
- 216 Oracle Analytics News
- 43 Oracle Analytics Videos
- 15.7K Oracle Analytics Forums
- 6.1K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 79 Oracle Analytics Trainings
- 15 Oracle Analytics Data Visualizations Challenge
- Find Partners
- For Partners
In the formula how can I convert number to string in a particular case

Imagine you have a field that is a number (for example a):
I want to convert the field value (in the formula) to the string 'NA' when the data is null .
How can I do this?
I tried with:
CASE WHEN a IS NULL THEN 'NA' ELSE a END
but it is not work .
Regards.
Answers
-
convert it char and then validate.
0 -
if the field is a number I can not apply the char() function.
0 -
You can't have a mixed datatype in the same column: if 'a' is a number, 'N/A' should be a number (which is impossible).
If you really want 'N/A' then every single number in that column should also be a text, which is maybe not what you want...
CAST() can be used to convert any datatype.
0 -
I saw that it is possible:
I followed the instructions of this article, an it works well :
0