THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Rob Farley

- Owner/Principal with LobsterPot Solutions (a MS Gold Partner consulting firm), Microsoft Certified Master, Microsoft MVP (SQL Server), APS/PDW trainer and leader of the SQL User Group in Adelaide, Australia. Rob is a former director of PASS, and provides consulting and training courses around the world in SQL Server and BI topics.

SSIS Lookup transformation in T-SQL

Hi! - Great that you've found this page, but it's no longer here! You can find the content over at: http://blogs.lobsterpot.com.au/2014/07/08/ssis-lookup-transformation-in-t-sql/

Published Tuesday, July 8, 2014 6:56 PM by Rob Farley

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Surjit said:

Hi,

I had below doubt on second outer apply

 When there is condition d1.BusinessKey IS NULL

 How can this cindition execute "AND d.BusinessKey = f.DimBK "

Thanks,

Surjit

July 16, 2014 4:51 AM
 

Rob Farley said:

Hi Surjit,

The first predicate is on the set d1, which is reflected in the Startup Filter. It means it only does this lookup if the first one (d1) has failed to find something.

The second predicate is on the tables d and f, and is used to find the record in the dimension table.

Does this help?

Rob

July 16, 2014 5:03 AM
 

Tarek said:

Hi Rob,

your post helped me a hell lot. I was trying to solve a similar scenario where I wanted to build a parent child table structure and I only knew that the parent is the next of the preceding elements in the list with HierarchyLevel-1. By changing the join that I made first your APPLY statement and constraining my resultset to TOP 1 DESC, I obtained exactly my desired result. Otherwise, by use of a common join I would have gotten as much duplicate rows as much rows of lower level were found in the list before.

Thanks a lot!

Best regards,

Tarek

May 21, 2015 8:42 PM
 

Rob Farley said:

That's great, Tarek! :)

May 21, 2015 9:36 PM
 

dsad said:

dadas

October 27, 2017 1:31 AM

Leave a Comment

(required) 
(required) 
Submit

This Blog

Syndication

Tags

No tags have been created or used yet.

News

News? Haven't you read my blog?

My Company


Can't find something?

Contact Me

IM: rob_farley@hotmail.com
Twitter: @rob_farley
Skype: rob_farley
E: rob_farley@hotmail.com

MVP (SQL Server)




Certifications








Adelaide SQL UG

Privacy Statement