Skip to Content
-2

Issue in Alphanumeric validation using BETWEEN statement?

Jan 26, 2017 at 09:48 AM

33

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Raymond Giuseppi
Jan 26, 2017 at 10:21 AM
0

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

Share
10 |10000 characters needed characters left characters exceeded
Horst Keller
Jan 26, 2017 at 10:29 AM
0
Share
10 |10000 characters needed characters left characters exceeded