i am using oracle sql. i would like to substr starting from characters XY0 and include 2 or 3 more characters until '-' sign in the string
These characters may be anywhere in the string.
Original
| column_value |
|---|
| 1st Row - Error due to XY0066- Does not fit -Not suitable |
| 2nd Row -Error due to specific XY0089- Will not match |
| 3rd Row -Not in good cond XY0215- Special type error |
Extraction should be
| result |
|---|
| XY0066 |
| XY0089 |
| XY0215 |
How can I do this?