SQL query to retun only part of a piece of data
Posted on 2011-03-08
I have a table in a database that contains data that looks like this:
The format of the data is always the same number of digits with the dashes always in the same place. I am looking for a query that will only return certain parts of the data. For example, I want the query to return only the first two digits, then then next two digits, then the next digits and so on so that my result from the query would contain separate columns with each of those pieces of data that is separated by the dashes. Is this possible? I know you can probably somehow use the Replace command but not sure how.