Importing data from Excel in SSIS, empty values -


I am using SSIS to import data from Excel Sheets in SQL Server 2005, with data in data Columns, which should contain the value of the last non-empty cell in the same column, looks like:

  2005 | 15 | Some 1 12 | Something 2 14 | Something3 2006 | 10 | Some 4 2 | Some 5 18 | Some 6 15 | Something7  

It should be filled in 2005 and 2006, but whatever I can get is the tap. Can I put the value of this field in a variable if it is not zero, and then use it to change the incoming zero values? You must use a script component in the data flow and go through each line using a variable to capture the last known value.

Update: Here's the code. I did it in SSIS 2008 in VSBS, so you may have to make some edits (for example, you may have to use DTS.Variables ["User: Last Year"]. Instead of Value.ToInt32 () Variables. Year of the year - I can not remember from the top of my head):

  Due to the last year, the integer Vice President Vice Presidentxute () MyBase.PreExecute () LastYear = 0 expires Sub People Sub Input0_ ProcessInputRow (by E. Valve row as the output row) if line.ir_isnal then line.yure = last year = year line Year end if and sub  

Hope, it helps!


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -