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

reading and verifying char in a string

$
0
0

Environment: SQL Server 2008 R2
Problem: I am trying to verify whether the following string is valid, which should include only those characters [a,b,c,d,z] in alnegth range between 60 to 65: "AAABBBBDCDBDBBBBBAAACCCZZZZABDCAAAAZDADCBBBDAZAAADDDDC" this is valid whereas,  this string is invalid "ABCDZWETUJNXCVVVSADSAZZVBBB" because w,e,j..est is not included [a,b,c,d,z]. How would this concept translate  to T-SQL.

Moreover, How I would check the range of number to be from 0 to 65 [separate from above it is a new question ]


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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