I have the following text from a column called ‘subject’:
Standard WiFi Install - (Broadband) by HS&S - Job No:VR041135037 on 2022-01-14
I need to extract the ID (VR041135037
) and the date (2022-01-14
) from the subject column.
What query can I write to go about doing this?
EDIT: This is the column from the table I have:
Subject |
---|
OPALS INSTALL by HS&S – Job No:VR041613130 on 2022-03-17 |
OPALS INSTALL by HS&S – Job No:VR041613130 on 2022-03-17 |
Standard WiFi Install – (Broadband) by HS&S – Job No:VR041729247 on 2022-03-17 |
Standard WiFi Install – (Broadband) by HS&S – Job No:VR041729247 on 2022-03-17 |
OPALS INSTALL by HS&S – Job No:VR041665578 on 2022-03-18 |
OPALS INSTALL by HS&S – Job No:VR041665578 on 2022-03-18 |
Thanks
2
Answers
We can try using the
SUBSTRING()
function in regex mode with the help of a capture group:You could nest
SPLIT_PART
function as well: