Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Issues in Lookup Transformation Expand / Collapse
Author
Message
Posted Monday, October 11, 2010 7:39 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, June 18, 2014 3:28 AM
Points: 1,044, Visits: 1,839
Nice...still wondering which is better join or pivot?

Regards/Raunak
Now a member of Linkedin

Please visit the all new Performance Point Forum
Please visit the all new Data Mining and Business Analytics Forum
Post #1002169
Posted Monday, October 11, 2010 7:50 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 2:35 PM
Points: 13,532, Visits: 11,328
Raunak Jhawar (10/11/2010)
Nice...still wondering which is better join or pivot?


The join, as the pivot transformation is semi-blocking




How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1002179
Posted Monday, October 11, 2010 7:56 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Wednesday, June 18, 2014 3:28 AM
Points: 1,044, Visits: 1,839
Nice...still wondering which is better join or 3 lookup task in SSIS.

Regards/Raunak
Now a member of Linkedin

Please visit the all new Performance Point Forum
Please visit the all new Data Mining and Business Analytics Forum
Post #1002184
Posted Friday, August 22, 2014 4:17 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, November 13, 2014 9:23 PM
Points: 86, Visits: 223
Try out a Execute SQL Task with the following code


create table #temp (cust_id int,phone_type varchar(10),phone_number int)
insert into #temp values(10001,'Home',1234),(10001,'Business',5678),(10001,'Mobile',918239)

select cust_id,
max((case when phone_type='Home' then phone_number else 0 end)) as home_phone,
max((case when phone_type='Business' then phone_number else 0 end)) as Business_phone,
max((case when phone_type='Mobile' then phone_number else 0 end)) as Mobile_phone
from #temp
group by cust_id

--drop table #temp

Post #1606184
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse