Hi,
Need to check whether first two characters of a string is alphabet or not.
Lets say for Ex,
String as 'DE123456' i need to check whether first character is non-numeric and then second character as non numeric.
kindly help me on this.
IF length(trim(p_parserec(31))) = 22 AND p_parserec(31) LIKE 'DE%' THEN
AUFTRAGGEBERKONTONR := trim(p_parserec(31)) ;
ELSIF (length(trim(p_parserec(31))) > 22 AND length(trim(p_parserec(31))) < 35) AND p_parserec(31) NOT LIKE 'DE%' THEN
AUFTRAGGEBERKONTONR := lpad(trim(p_parserec(31)), 34, 0) ;
ELSIF length(trim(p_parserec(31))) > 10 AND ascii(substr(p_parserec(31), 1, 2)) between 48 and 57 THEN
AUFTRAGGEBERKONTONR := lpad(trim(p_parserec(31)), 10, 0) ;
ELSE
p_errorcd := sqlcode ;
p_errordata := sqlerrm ;
END IF ;
Note : In the third else if condition the character should be greater than 10 and first 2 characters should not be alphabets.