Skip to Content
avatar image
-2
Former Member

Issue in Alphanumeric validation using BETWEEN statement?

Dear Team,

I have an issue here in one of the validation:

Here if the P_ALPHA declared as CHARG_D which is CHAR 30.

If the P_ALPHA is 32916N - then its triggering error message

but if the P_ALPHA is '29416J' then its goes 'Valid value'.

-------------------------------------------------------------------------

IF p_alpha BETWEEN '3000000000' AND '3999999999'.

WRITE:/ 'Trigger error'.

ELSE.
WRITE:/ p_alpha, 'Valid value'.
ENDIF.

-------------------------------------------------------------------------

Q1: Please let me know why for 32916N value it goes to 'Trigger error'.

Q2: If we want to get 32916N to valid value what would be the declaration type for P_ALPHA.

Please suggest.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 26, 2017 at 10:21 AM

    There are no conversion-exit associated to the domain, so result is logical for comparing some alphabetic string. Even with an ALPHA convexit, the trailing character prevent any mapping with trailing zero, so what was your initial requirement?

    Regards,
    Raymond

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 26, 2017 at 10:29 AM
    Add comment
    10|10000 characters needed characters exceeded