Forum Discussion
Stumped on extracting this number string
You could consider taking the first 8 characters of the row and turning that into a number. This will remove the leading zeros from any numbers. Removing the leading zeros also reduces the number of characters present. You can then test if 8 characters remain.
For example:
0090455496 is 10 characters, we will ask for the first 8 to get 00904554. Turning this into a number makes this now 904554 which is 6 characters in length.
This code will take the first 8 characters and turn them into a number. If an error occurs a null is populated. The number that we converted is then converted back into text and the length is calculated. If the length is 8 then the Column1 is returned, if not null is returned.
Hope this gets you pointed in the right direction.