I have a database field which contains a long string of text:
Date: 02/03/22 Customer Price: 500 Total Price: 701.56 Paid to Date: 304.10 Confirmed: TRUE
What would be the best way of extracting out certain numbers from this string? For example, how could I extract 'Total Price' (701.56) and 'Paid to Date' (304.10)? I think I need to use REGEXP_SUBSTR but not I'm 100% sure. For example:
select REGEXP_SUBSTR(my_field_name, 'Total Price: (SOME-REGEX)') as total_price,
select REGEXP_SUBSTR(my_field_name, 'Paid To Date: (SOME-REGEX)') as paid_to_date,
from my_table
I only need to return the values, not the preceding text.
