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

Extract specific STRING from field

$
0
0

Just wondering if its possible to extract specific string from a field?

I need anything after 01 and before 1723

Here a few examples

010761181936222217230800 010761181936243717231200 010761181936240617230900 010761181936070917231201 010761181937752317230801

010761181936070917231201 010761181936240617230900

010761181937752317230801 010761181936222217230800 010761181936070917231201

010761181936243717231200 010761181936240617230900 010761181937752317230801

below is a sample dataset

declare @tab table(ch varchar(maX))
insert @tab select '010761181936222217230800 010761181936243717231200 010761181936240617230900 010761181936070917231201 010761181937752317230801' 
insert @tab select '010761181936070917231201 010761181936240617230900' 
insert @tab select '010761181937752317230801 010761181936222217230800 010761181936070917231201' 
insert @tab select '010761181936243717231200 010761181936240617230900 010761181937752317230801'
select * from @tab


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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