0

I am trying to take a count of the records in the interactive grid and based on that I am trying to pass a message to the user. However, I am getting error : ORA-06550: line 1, column 141: PLS-00103: Encountered the symbol "NUMBER" when expecting one of the following: := . ( @ % ; The symbol "." was substituted for "NUMBER" to continue.Following is my code in the validation. Validation Type is : Function Returning Error Text.

l_count NUMBER := 0;

BEGIN

  SELECT COUNT(1)
      INTO l_count
      FROM  ugh
     WHERE ugh.pre = :PRE
       AND ugh.APP1 = :APP1
       AND ugh.APP2 = :APP2
       AND ugh.APP3 = :APP3
       AND ugh.FINL_APP = :FINL_APP;
 
IF l_count > 1 THEN
      IF END_DATE IS NULL THEN
         RETURN 'Error Message to be displayed.';
      ELSE
      RETURN NULL;
      END IF;
    ELSE
     RETURN NULL;
   END IF;
END;

Can anyone please help ?

1 Answer 1

1

Looks like you're missing the DECLARE keyword:

DECLARE                           --> this
   l_count  NUMBER := 0;
BEGIN
   SELECT COUNT (1)
     INTO l_count
     FROM ugh

Also, what is END_DATE? You never declared it. If it is a page item, then precede it with a colon, :END_DATE

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.