Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Exception in In-Line Function
This inline function is supposed to error out (no_data_found)
what is wrong ?
How do I make the SELECT error out ?
thanks
(10gR2)
SQL> CREATE OR REPLACE
2 FUNCTION blah(p_a IN NUMBER) RETURN VARCHAR2
3 IS
4 l_return VARCHAR2(30);
5 BEGIN
6 SELECT 'x' || to_char(p_a) INTO l_return 7 FROM dual WHERE 1 = 0; 8 RETURN l_return; 9 EXCEPTION 10 WHEN no_data_found THEN 11 RAISE ;
Function created.
Elapsed: 00:00:00.13
rchin_at_DEV10> select blah('124578') from dual;
BLAH('124578')
1 row selected. Received on Wed Nov 29 2006 - 14:25:58 CST