Quantcast
Channel: Microsoft SQL Server
Viewing all articles
Browse latest Browse all 4871

How to query by a set length or number of characters?

$
0
0

First, in this instance, I can't create a field for the length of the given field, indcode. Reason for this is that this will be used in tableau (that is a whole other story). Needing to query for those indcodes that are 2 or 3 characters in length. They would need to be arranged by indcode in a manner such as this. Would you order it in ascending order based on each number as it reads left to right?

Text
11

  111  

  112

  113

12

  121

  122

21

   211      

Viewing all articles
Browse latest Browse all 4871


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