how to return some default value in oracle cursor when nothing is found
Posted
by john
on Stack Overflow
See other posts from Stack Overflow
or by john
Published on 2010-06-11T22:55:16Z
Indexed on
2010/06/11
23:02 UTC
Read the original article
Hit count: 164
Oracle
I have following statement in one of the oracle SP:
OPEN CUR_NUM FOR
SELECT RTRIM(LTRIM(num)) as num
FROM USER WHERE USER_ID = v_user_id;
When the above does not return anything the SP result just has no column name in it. But I'd like the cursor to still have num
column with some default value like NOTHING
when no data is found.
Is this doable ?
© Stack Overflow or respective owner