Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Is there any way to set 'varcar' in number type?

When I write,

SELECT last_name,NVL(commission_pct,0)
FROM Hr.employees;

It works fine. When Commission percentage is null then it set to 0.

But i want to set ‘NO COMMISSION’ instead of 0.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

If you return the commision value as a string, yes.

select last_name, nvl(to_char(commission_pct),'NO COMMISSION')
from hr.employees
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading