Oracle (replace + substr) function used in combination, oraclesubstr
select replace('33021622221111',substr('33021622221111',7,4),9527) from dual;
How to Use the substr function in oracle
Substr
Truncates string functions in Oracle.
Syntax:
Substr (string, start_position, [length])
Parameter Analysis:
String
String Value
Start_position
Truncates the initial position of a string. If 'number' is input and 'start _ position' is negative, it indicates the Number starting from the right of the string.
Length
Number of truncated digits, Number type
Here, length is optional. If length is null (that is, if it is left blank), all characters After start_position are returned.
Meaning:
Start from start_position and return the length string.
For more information, see.
Example:
SELECT substr ('this is a test', 6, 2) FROM dual return 'is'
Substr ('syranmo have a dream',-8, 2)
Substr function in oracle
Substr (DETAIL_TYPE, 4,1) = '6'
The fourth character of the string to be intercepted is equal to '6 '.
If the problem is added, it should be substr (DETAIL_TYPE)
When the value of DETAIL_TYPE is 1111053,
Substr (DETAIL_TYPE, 1, 6) = 111105
Take six characters from the first part of DETAIL_TYPE.