URGENT PL/SQL IN SELECT STATEMENTS [message #19898] |
Wed, 17 April 2002 03:49 |
Anderson
Messages: 10 Registered: December 1999
|
Junior Member |
|
|
I have written a function which takes one argument as below:
FUNCTION CHECKING (DPT_CODE VARCHAR2)RETURN VARCHAR2 is
DEPT VARCHAR2(4);
BEGIN
DEPT := :DPT_CODE;
if :DPT_CODE like 'C%'
then
return 'y';
else
return 'n';
end if;
END;
If I use this in the select statement as this select DPT_Code from tableName where Checking(DPT_Code) = 'y'
it doesnt work.
I get an error messege INVALID COLUMN NAME. CAN U PLEASE HELP. I HAVE PUT THIS UNDER THE PROGRAM UNITS IN REPORTS. PLEASE HELP
|
|
|
|
|