SQL Query | How to extract numbers from String | Split word into characters | Two methods

preview_player
Показать описание
In this video, we discuss how to extract number/ alphabets from a string.

Video tutorial on Translate -

Video tutorial for recursive CTE

Oracle REGEX_REPLACE Examples

Check out the complete list of SQL Query Interview Questions -

Please do not forget to like, subscribe and share.

For enrolling and enquiries, please contact us at
Рекомендации по теме
Комментарии
Автор

CROSS APPLY is not needed, you can write easier:

With Position AS (
SELECT 1 as POS
UNION ALL
SELECT POS+1 from Position
),

Character AS
(
FROM Position
)
SELECT STRING_AGG (CH, '')
FROM Character
WHERE CH LIKE '[0-9]'

nikolaybaranov
Автор

Very helpful as always. Thank you for sharing these with us!

hv
Автор

Hi can u do the video about performance tuning, what are the steps we need to c while doing performance tuning

avinashc
Автор

Thank you! I believe using patindex is another option.

kingstonxavier
Автор

How could you create a function with it? I find it helpful. Thanks

dfkgjdflkg
Автор

what if instead of a @string i have a column of a table like select text1 from table1?

velo
Автор

No need for cross apply and only need 1 CTE...
with POSITION as (
select 1 as POS
union all
select POS + 1
from POSITION
)
from POSITION

rmarkette
Автор

Hello, how to update a column of a table using join and case? I am getting error, can you please reply?

shilpagupta
Автор

Hi How to create sql id with date and number date is changed start number with 1

muralikrishnachowdarypolin
Автор

Hello! How many years of experience you have in SQL server? Thank you

florinorita