fibonaccii
Technical User
I have come accross a roadblock. I need to parse a string that is passed to a variable. I need to parse two seperate strings from one string to be compared.
The 1st string to be parsed can have either 6,7,or 8 characters in the initial part of the string. The second is always constant to '5-4' characters, whish is to be distinguished from the 1st.
String Ex: 1) 123456..-12-CON or 2) 12345-1234
Currently my Stored Procedure looks something as below which only takes care of the 2nd string:
L_DEPT_CODE := substr(inpdata,1,5);
L_ACC_CODE := Substr(inpdata,7);
Begin
SELECT ACC_NAME, DEPT_NAME
INTO L_ACCOUNT_NAME,L_DEPT_NAME
From DA.ACCDEP_TABLE@TC10 A, DA.ACCOUNT@TC10 B, DA.DEPT@TC10 C
WHERE A.ACC_CODE = L_ACC_CODE
AND A.DEPT_CODE = L_DEPT_CODE
AND A.DEPT_CODE = C.DEPT_CODE
AND A.ACC_CODE = B.ACC_CODE;
The 1st string to be parsed can have either 6,7,or 8 characters in the initial part of the string. The second is always constant to '5-4' characters, whish is to be distinguished from the 1st.
String Ex: 1) 123456..-12-CON or 2) 12345-1234
Currently my Stored Procedure looks something as below which only takes care of the 2nd string:
L_DEPT_CODE := substr(inpdata,1,5);
L_ACC_CODE := Substr(inpdata,7);
Begin
SELECT ACC_NAME, DEPT_NAME
INTO L_ACCOUNT_NAME,L_DEPT_NAME
From DA.ACCDEP_TABLE@TC10 A, DA.ACCOUNT@TC10 B, DA.DEPT@TC10 C
WHERE A.ACC_CODE = L_ACC_CODE
AND A.DEPT_CODE = L_DEPT_CODE
AND A.DEPT_CODE = C.DEPT_CODE
AND A.ACC_CODE = B.ACC_CODE;