D
D
denislysenko2022-04-15 11:17:02
SQL
denislysenko, 2022-04-15 11:17:02

How to use regular expression in sql to get different column?

there is the following data:

order_number # это название столбца
apte/00132112   # это значение столбца
city.ru/000303211      # это значение столбца
vcity.ru/31231212       # это значение столбца

How can one get such a column? :
order_number  # это название столбца
132112       #это значение столбца
303211       #это значение столбца
31231212     #это значение столбца

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
denislysenko, 2022-04-15
@denislysenko

split(order_number, '/')[1] as order_number
But the solution that is written in the comments is better

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question