In my project, I have a column that contains numbers (including "-" symbol) and a string. I want to split it into two columns. The separator between numbers and string differs it can be " " or " - ". Is it possible to solve this issue by means of a TSQL query? This TSQL engine is placed in Devexpress WinForms designer.
Example:
| Col: |
|---|
| 343234-2321 String string |
| 402-09-12 - Another string |
| Just string |
| 303-404 - Text field |
Expected result
| Col1 | Col2 |
|---|---|
| 343234-2321 | String string |
| 402-09-12 | Another string |
| NULL | Just string |
| 303-404 | Text field |
Thank you in advance!
String1 string2 99283948 string3?