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

How to spilt a field in SQL

$
0
0

Hi

How can I spilt this field to return only the codes starting with AB?  The AB code could be in any position in the column.  The length of the numbers are always the same.

GW12345 | QW12345 | AB12345

Ive tried a case statement, but it only works if the AB code is the first code in the column.  It is ignoring the code if it is in 2nd or 3rd position

Thanks


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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