Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Breaking a column into two

$
0
0

Let me try to explain the problem...

In my SQL table I have Column A. It contains a number "16382B76     NPAD89723". It could be any combination of numbers and letters and then 10-15 spaces between the numbers(I don't know how or why they came up with this naming scheme but I have to work with it). I need to break Column A into two columns. Column B with the first number and Column C with the second number. All the solutions I find have a set amount of characters or a character that would be what the columns were broken up by. But I will not know if there is 10 spaces or 15 or whatever.

I figured I could just create two new columns in my table and add in a formula in the two Computed Columns that says end at the space character or start at the space character, but I'm not sure as everything I've tried has failed.


Viewing all articles
Browse latest Browse all 24688

Trending Articles



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