I am enrolled at the Art Institute of Pittsburgh - Online working towards a Bachelor of Science in photography.
My other blog [blogspot.com]
SQL> CREATE OR REPLACE FUNCTION test (p_in IN VARCHAR2)
2 RETURN NUMBER
3 AS
4 BEGIN
5 IF p_in = "" THEN
6 RETURN 0;
7 END IF;
8 END test;
9/
CREATE OR REPLACE FUNCTION test (p_in IN VARCHAR2)
*
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-01400: cannot insert NULL into ("SYS"."OBJ$"."NAME")
Say what? That error message does anything but scream "you used the wrong quoting character".
SQL> CREATE OR REPLACE FUNCTION test (p_in IN VARCHAR2)
2 RETURN NUMBER
3 AS
4 BEGIN
5 IF p_in = '' THEN
6 RETURN 0;
7 END IF;
8 END test;
9/
Function created.
How hard is it... (Score:2)
Re: (Score:1)
Re: (Score:2)
Re: (Score:1)
One looks to be a constructor for literals, the other is a quote for database object names.
Also... (Score:2)
''is identical toNULL. So will never return true.Use
instead.Re: (Score:2)
Re: (Score:1)