We help IT Professionals succeed at work.
Get Started

SSIS null/ blanks values

Last Modified: 2013-11-10
I have a script task which extracts information from a text flat file.

The script works fine and extracts the information I need.

However, the parts of the text file I don’t need it seems to output what seems to be a Null value or blank space (e.g “ “). Therefore the end result looks a little like this:

1022,ABC, EFG, HIj, LMN, POL (3P)                                           1
1022,DIPH, PERT, TET, POL (1B)                                              2
1022,DIH, PERT, TET, POL, MR (1B)                                           7
1022,MNC (1P)                                                               2
1022,MR (1B)                                                                5
1022,PNEU (2P), DIPH, PERT, TET, HIB, POL (3P)                              1

How do I stop all those blank spaces separated by a comma?

I have included my script bellow.

''Capture Clinic Number
        If Left(Row.DataConversionText1, 6) = "Clinic" Then
            ClinicNo = Right(Left(Row.DataConversionText1, 13), 4)
        End If

        ''Capture imms 
        If Row.DataConversionText1 = "    Cat                                            Number of members" Then
                Do While Row.DataConversionText1 <> ""
                    Row.Imms = Trim(Row.DataConversionText1.ToString())
                    Row.Clinic = ClinicNo
            Catch e As RowIndexOutOfRangeException
            End Try
        Else : Row.Clinic = ""

        End If

Open in new window

Watch Question
This problem has been solved!
Unlock 1 Answer and 2 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE