Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 Fetch numeric values from string in SSIS

Author  Topic 

rohit.kumar.barik
Starting Member

4 Posts

Posted - 2013-08-22 : 05:47:27
I need to implement below scenario in SSIS 2008
I am getting values like below.

EN 60320.V.1
EN 61000-4-1
EN 294
EN ISO 3506-1
EN 61400-25-6

Need output as

60320
61000
294
3506
61400

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2013-08-27 : 12:06:49
1st establish rules for where the number is within a string.
i.e

a) always after at least 1 space (or whatever)
b) always ends with something other than 0-9...i.e comma, dash, a-z, dot, etc
c) other rules as necessary

2nd - code the rules. experiment around the edge cases - scientific numbers, decimal places etc...
you'll need to use the some search and replace techniques. experiment and post your example code here and poeple will help you imrpvoe it.
Go to Top of Page

yosiasz
Master Smack Fu Yak Hacker

1635 Posts

Posted - 2013-08-27 : 23:17:40
parsing will always come to bite you, 100%. something will come in one day that will mess you up. is there any way you can ask the provider of these values to standardize them? is there any predictable pattern in these values, whatever industry they are from.

<><><><><><><><><><><><><><><><><>
If you don't have the passion to help people, you have no passion
Go to Top of Page
   

- Advertisement -