1. Overview
When we give PANcard, We are returning PANcard is valid or not.
2. Technologies and Tools Used
The following technology has been used to achieve the expected output.
- Oracle PLSQL
3. Use Case
When we give PANcard, We are returning PANcard is valid or not.
4. Architecture
Following steps explains in detail,
CREATE OR REPLACE FUNCTION function_chk_pan_no_valid(p_pan_no IN VARCHAR2)
RETURN VARCHAR
IS
v_pan_regexp CONSTANT VARCHAR2(1000) := ‘[A-Z]{5}[0-9]{4}[A-Z]{1}’;
BEGIN
IF REGEXP_LIKE(p_pan_no, v_pan_regexp) AND LENGTH(p_pan_no) = 10 THEN
RETURN ‘Pancard is valid’;
ELSE
RETURN ‘Pancard is Not valid’;
END IF;
EXCEPTION
WHEN OTHERS THEN
RETURN ‘Pancard is Not valid’;
END;
OUTPUT :-
Recent Posts