[Solved] Error(4,1): PLS-00103: Encountered the symbol “AS”


The error speaks for itself:

Error(4,1): PLS-00103: Encountered the symbol “AS” when expecting one
of the following: return

Remove the AS and define what the function RETURN

create or replace FUNCTION BOD_FM_FSCS_A_Data(
    -- Add the parameters for the function here
    p_ExclusionsOnly NUMBER DEFAULT 0 )
RETURN NUMBER....

Here’s an example from the docs

CREATE FUNCTION get_bal(acc_no IN NUMBER) 
   RETURN NUMBER 
   IS acc_bal NUMBER(11,2);
   BEGIN 
      SELECT order_total 
      INTO acc_bal 
      FROM orders 
      WHERE customer_id = acc_no; 
      RETURN(acc_bal); 
    END;
/

solved Error(4,1): PLS-00103: Encountered the symbol “AS”