| |
GeekInterview.com > Interview Questions > Oracle > SQL Plus
| Print | |
Question: Display the records between two range I know the nvl function only allows the same data type(ie. number or char or date Nvl(comm, 0)), if commission is null then the text “Not Applicable” want to display, instead of blank space. How do I write the query
|
| June 06, 2008 12:12:07 |
#3 |
| Dr. Codd |
Member Since: June 2008 Total Comments: 2 |
RE: Display the records between two range I know the nvl function only allows the same data type(ie. number or char or date Nvl(comm, 0)), if commission is null then the text “Not Applicable” want to display, instead of blank space. How do I write the que |
If "comm" is zero then the above query will give wrong result. Query should be
SELECT NVL (To_Char(comm), 'Not Applicable') FROM table_name; |
| |
Back To Question | |