Avatar of banjara15
banjara15
 asked on

SSIS Merge Join Error


I am using SSIS (Sql Server 2005). I have created a SSIS Package, I am trying to use a "Merge Join" Transformation in the Package but keep getting this error (See the attached screen shot). Please help me to resolve this...

Thanks
SSIS-Problem.doc
Microsoft SQL ServerMicrosoft SQL Server 2005

Avatar of undefined
Last Comment
Reza Rad

8/22/2022 - Mon
Reza Rad

you can add sort transformation before merge join for both sources, this will solve the problem
ASKER CERTIFIED SOLUTION
Reza Rad

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
banjara15

ASKER

Reza_red,

I am using a query in the OLE DB source which is sorted, I do not want to use the Sort Transformation as that will affect the performance. I do not understand why can't the Merge Join transformation see that the data is sorted and still giving me the error. Is there any place else I need to set the "IsSorted" property to "True"?

Thanks
banjara15

ASKER
Thanks for your help. I made some changes to the package and removed all intermediate transformations between OLE DB soure and Merge join, now I am able to use the "Merge join" transformation without any problem.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23
Reza Rad

Merge Join needs to have sorted data get in.
so if you want to send data to merge join, you must set IsSorted to True, OR use Sort transformation.
but in your case why setting IsSorted To True didn't solved the problem, because you used transformations after first oledb source, SSIS compiler needs to sure that data in is sorted, you have no  IsSorted property in UNION ALL transformation . so you HAVE TO use sort transformation after that.
and you removed all intermediate transformation , this will connect first oledb source with IsSorted Property to Merge Join and so everything is fine now.

Regards,
Reza Rad