Categories
- All Categories
- 70 Oracle Analytics News
- 7 Oracle Analytics Videos
- 13.9K Oracle Analytics Forums
- 5.2K Oracle Analytics Idea Labs
- Oracle Analytics User Groups
- 38 Oracle Analytics Trainings
- 56 Oracle Analytics Data Visualizations
- 2 Oracle Analytics Data Visualizations Challenge
- 2 Oracle Analytics Career
- 4 Oracle Analytics Industry
- Find Partners
- For Partners
Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture
In the formula how can I convert number to string in a particular case
User_8PPKU
Rank 2 - Community Beginner
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.
0
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