vendredi 10 janvier 2020

insert value only when column is null

I have 2 different excel sources

1, employee excel source

2, sales excel source

In my employee source I have multiple folder and In my sales source I have multiple folder as well as multiple sheets, so I had to use two data flow task and two for each loop containers for that purpose,

I need to take the ID column from my employee excel source, if the ID column in my employee source is not available (null) only if not available in my employee source then I need to get the ID Column from my sales source, they have matching SSN, how can I achieve this?

This is my staging table

SELECT ID ,[SSN] ,[Borrower FirstName] ,[Borrower LastName] ,[Borrower Email] ,[Home Phone] ,[Cell Phone] ,[Marital Status] ,[Date of Birth] ,[Current Street Address] ,[City] ,[State] ,[Zip] ,[YearsAtThisAddress] ,[Sex] ,[Ethnicity] ,[Race] FROM [Mortgage] , this is my staging table, half of my data from the employee and half from sales.

 employee source has 

[ID] ,[SSN] ,[Borrower FirstName] ,[Borrower LastName] ,[Borrower Email] ,[Home Phone] ,[Cell Phone] ,[Marital Status] ,[Date of Birth] ,[YearsAtThisAddress]

and SALES source have

[ID] ,[SSN] ,[Borrower FirstName] ,[Borrower LastName] ,[Borrower Email] ,[Home Phone] ,[Cell Phone] ,[Current Street Address] ,[City] ,[State] ,[Zip]

Aucun commentaire:

Enregistrer un commentaire