Merge Join showing wrong results when you use 'Advanced Editor'

  • 1. Table 1 contains 4 columns

    ContactId, FirstName, MiddleName, LastName

    In Advance editor under 'OLE DB Source Output Properties” branch and i have set the “IsSorted” property to True.

    and also in “OLE DB Source Output Properties” branch i have set 'SortKeyPosition' to 1 for the column 1(ContactId)

    2.Table 2 contains 3 columns

    ContactId,SalesOrderId,TotalDue

    Made necessary changes in this table also using Advanced Editor

    When you use Merge join Transformation. Output shows only 16 rows. This is incorrect

    When you perform the same operation using the other way that is using sort transformation.Result shows 30000 records or rows.Which is correct

    Can anybody help me regarding this. Do i need to make any others operations in Advanced Editor?

    Is it a bug just curious

  • Is the output sorted when you tell it that it is? I've seen people set that flag when it wasn't really sorted. Also what is the datatype of ContactId?

    CEWII

  • Yes, Elliott is right, Setting the value of the IsSorted property to True does not sort the data. This property only provides a hint to downstream components that the data has been previously sorted.

    So beside you set the IsSorted property, you need to sort the source data (Table1 and Table2). To sort table1 you can use OLEDB Destination with SQL Command "select * from Table1 order by ContactId", This should be faster than use "Sort" transformation.

    For reference you can read :

    http://msdn.microsoft.com/en-us/library/ms137653.aspx

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply