Hi,
I have a parameter in my stored procedure called pCODE. Right now the field this parameter is based can be of variable length and is of type varchar2. . The way I want to use this pCODE parameter is that if the user enters the value "National" for this parameter it should show only those records where the length of the field is 6 and the last 2 characters are alphanumeric.
This is what I tried but keep getting an error
What am I doing wrong?
Secondly, how should I incorporate "National" in my where clause so that it should return records based on above condition. I am a little unclear on that.
Thanks,
-E
I have a parameter in my stored procedure called pCODE. Right now the field this parameter is based can be of variable length and is of type varchar2. . The way I want to use this pCODE parameter is that if the user enters the value "National" for this parameter it should show only those records where the length of the field is 6 and the last 2 characters are alphanumeric.
This is what I tried but keep getting an error
Code:
length(task_code) = 6 and regexp_instr(substr(task_code, 5, 6), '[A-Z][A-Z]')
What am I doing wrong?
Secondly, how should I incorporate "National" in my where clause so that it should return records based on above condition. I am a little unclear on that.
Thanks,
-E