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)
 How will I use OR operator in SSIS

Author  Topic 

Niladri20052006
Starting Member

4 Posts

Posted - 2012-09-18 : 07:38:32
Hi All,

I am facing a challenge. I have two tables in SQL.(Table1 and Table2). In table 1 I have one column named email but there are some blank email IDs.

I want to merge those tow table and there is the condition. where the email is null it should be filled up like fristname.lastname@abc.com

I have merged the data in a table through merge join and able to get only the info of those ID where Email is not null.

What I want is that it will show me all the records and where the the email is blank should be filled up like fristname.lastname@abc.com

Please suggest!

Thanks in advance

Niladri



Niladri Sekhar Biswas

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-09-18 : 11:09:25
current way it is, you can add a conditional transform to check for email field condition (null vs not null). then create output paths based on condition to populate default value or actual one

But easier way would be to do this in t-sql by writing source query based on join between tables based on this logic if tables are in same server. Only if they're from heterogenous source I would considering doing this in SSIS

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -