Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

splitting column

$
0
0
declare @a varchar(50)='$400 per FBD'
Select @a

sometimes the column value is like this


declare @a varchar(50)='$2000 x FBDs /5'
Select @a

At the end I'm interested in seeing like this 

amount   Divider

400             1   (As there is no divider like as in second example)

2000           5

Note.The length is not fixed. I cannot use substring.

Any help is highly appreciated.



Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>