Oracle REGEXP Gurus:
I am on Oracle 19c
I need to split this string into 3 sections:
section 1 will have first 4 characters
section will have next 4 characters , ignoring leading zeros
section 3 will have last 6 characters until the fist occurrence of zero
Start Date : first data after ;
end date : next data after ; if ‘-’ then end date is NULL
Sample sets:
A01K0151080000;20000101;20051231
A01L0151080000;20000101;-
K01B0009020030;20220101;-
I need :
example 1 : A01K0151080000;20000101;20051231
Section 1 = A01K
Section 2 = 151
Section 3 = 08
Start Date = 20000101
End date = 20051231
Example 2: A01L0151080000;20000101;-
Section 1 = A01K
Section 2 = 151
Section 3 = 08
Start Date = 20000101
End date = NULL ( since the last character is ‘-’)
Example 3 : K01B0009020030;20220101;-
Section 1 = K01B
Section 2 = 9
Section 3 = 02003
Start Date = 20000101
End date = NULL ( since the last character is ‘-’)
Thanks much!
Kevin