![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hello, I have created a simple function for use in an update statement. The fuction is FUNCTION myfnc(p1 IN t1.c1%TYPE) RETURN VARCHAR2 IS BEGIN IF p1 = 3 THEN RETURN 'A'; ELSE RETURN 'B'; END IF; END myfnc; I use it in a procedure which exists in the same package as the function as follows Update t1 set c1 = myfnc(c2); I am getting Function 'myfunc' may not be used in SQL. There is no db manipulation going on and I have tried using PRAGMA RESTRICT_REFERENCES (myfnc, WNDS, WNPS, RNDS, RNPS); but to no avail. Any suggestions? |
#3
| |||
| |||
|
|
Hello, I have created a simple function for use in an update statement. The fuction is FUNCTION myfnc(p1 IN t1.c1%TYPE) RETURN VARCHAR2 IS BEGIN IF p1 = 3 THEN RETURN 'A'; ELSE RETURN 'B'; END IF; END myfnc; I use it in a procedure which exists in the same package as the function as follows Update t1 set c1 = myfnc(c2); I am getting Function 'myfunc' may not be used in SQL. There is no db manipulation going on and I have tried using PRAGMA RESTRICT_REFERENCES (myfnc, WNDS, WNPS, RNDS, RNPS); but to no avail. Any suggestions? |
#4
| |||
| |||
|
|
Hello, I have created a simple function for use in an update statement. The fuction is FUNCTION myfnc(p1 IN t1.c1%TYPE) RETURN VARCHAR2 IS BEGIN IF p1 = 3 THEN RETURN 'A'; ELSE RETURN 'B'; END IF; END myfnc; I use it in a procedure which exists in the same package as the function as follows Update t1 set c1 = myfnc(c2); I am getting Function 'myfunc' may not be used in SQL. There is no db manipulation going on and I have tried using PRAGMA RESTRICT_REFERENCES (myfnc, WNDS, WNPS, RNDS, RNPS); but to no avail. Any suggestions? |
#5
| |||
| |||
|
|
Hello, I have created a simple function for use in an update statement. The fuction is FUNCTION myfnc(p1 IN t1.c1%TYPE) RETURN VARCHAR2 IS BEGIN IF p1 = 3 THEN RETURN 'A'; ELSE RETURN 'B'; END IF; END myfnc; I use it in a procedure which exists in the same package as the function as follows Update t1 set c1 = myfnc(c2); I am getting Function 'myfunc' may not be used in SQL. There is no db manipulation going on and I have tried using PRAGMA RESTRICT_REFERENCES (myfnc, WNDS, WNPS, RNDS, RNPS); but to no avail. Any suggestions? |
#6
| |||
| |||
|
|
Hello, I have created a simple function for use in an update statement. The fuction is FUNCTION myfnc(p1 IN t1.c1%TYPE) RETURN VARCHAR2 IS BEGIN IF p1 = 3 THEN RETURN 'A'; ELSE RETURN 'B'; END IF; END myfnc; I use it in a procedure which exists in the same package as the function as follows Update t1 set c1 = myfnc(c2); I am getting Function 'myfunc' may not be used in SQL. There is no db manipulation going on and I have tried using PRAGMA RESTRICT_REFERENCES (myfnc, WNDS, WNPS, RNDS, RNPS); but to no avail. Any suggestions? |
#7
| |||
| |||
|
|
Hello, I have created a simple function for use in an update statement. The fuction is FUNCTION myfnc(p1 IN t1.c1%TYPE) RETURN VARCHAR2 IS BEGIN IF p1 = 3 THEN RETURN 'A'; ELSE RETURN 'B'; END IF; END myfnc; I use it in a procedure which exists in the same package as the function as follows Update t1 set c1 = myfnc(c2); I am getting Function 'myfunc' may not be used in SQL. There is no db manipulation going on and I have tried using PRAGMA RESTRICT_REFERENCES (myfnc, WNDS, WNPS, RNDS, RNPS); but to no avail. Any suggestions? |
#8
| |||
| |||
|
|
Hello, I have created a simple function for use in an update statement. The fuction is FUNCTION myfnc(p1 IN t1.c1%TYPE) RETURN VARCHAR2 IS BEGIN IF p1 = 3 THEN RETURN 'A'; ELSE RETURN 'B'; END IF; END myfnc; I use it in a procedure which exists in the same package as the function as follows Update t1 set c1 = myfnc(c2); I am getting Function 'myfunc' may not be used in SQL. There is no db manipulation going on and I have tried using PRAGMA RESTRICT_REFERENCES (myfnc, WNDS, WNPS, RNDS, RNPS); but to no avail. Any suggestions? |
#9
| |||
| |||
|
|
Hello, I have created a simple function for use in an update statement. The fuction is FUNCTION myfnc(p1 IN t1.c1%TYPE) RETURN VARCHAR2 IS BEGIN IF p1 = 3 THEN RETURN 'A'; ELSE RETURN 'B'; END IF; END myfnc; I use it in a procedure which exists in the same package as the function as follows Update t1 set c1 = myfnc(c2); I am getting Function 'myfunc' may not be used in SQL. There is no db manipulation going on and I have tried using PRAGMA RESTRICT_REFERENCES (myfnc, WNDS, WNPS, RNDS, RNPS); but to no avail. Any suggestions? |
#10
| |||
| |||
|
|
Hello, I have created a simple function for use in an update statement. The fuction is FUNCTION myfnc(p1 IN t1.c1%TYPE) RETURN VARCHAR2 IS BEGIN IF p1 = 3 THEN RETURN 'A'; ELSE RETURN 'B'; END IF; END myfnc; I use it in a procedure which exists in the same package as the function as follows Update t1 set c1 = myfnc(c2); I am getting Function 'myfunc' may not be used in SQL. There is no db manipulation going on and I have tried using PRAGMA RESTRICT_REFERENCES (myfnc, WNDS, WNPS, RNDS, RNPS); but to no avail. Any suggestions? |
![]() |
| Thread Tools | |
| Display Modes | |
| |