SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 SSIS and Import/Export (2008)
 How will I use OR operator in SSIS
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Niladri20052006
Starting Member

India
4 Posts

Posted - 09/18/2012 :  07:38:32  Show Profile  Reply with Quote
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

India
52309 Posts

Posted - 09/18/2012 :  11:09:25  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000