• python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Facebook Twitter Instagram
Devs Fixed
  • python
  • javascript
  • reactjs
  • sql
  • c#
  • java
Devs Fixed
Home ยป Resolved: how to extract all digit in nvarchar variable in ms sql

Resolved: how to extract all digit in nvarchar variable in ms sql

0
By Isaac Tonny on 17/06/2022 Issue
Share
Facebook Twitter LinkedIn

Question:

I wanna extract all digit in nvarchar variable and store them in a table or pre-declare variable. example:
and the target result may be like this.

Answer:

Another implementation of a recursive cte, but this time without substring since you don’t seem to like that
See also this DBFiddle
You can also insert this result into an existing table if you want, see this DBFiddle for an example

If you have better answer, please add a comment about this, thank you!

sql sql-server
Share. Facebook Twitter LinkedIn

Related Posts

Resolved: Passing 2 functions in onChange in react

24/03/2023

Resolved: Why doesn’t stringstream consume output during hex formatting?

24/03/2023

Resolved: CMake path for python3 libraries doesn’t change (windows 10)

24/03/2023

Leave A Reply

© 2023 DEVSFIX.COM

Type above and press Enter to search. Press Esc to cancel.