November 23, 2010 at 6:02 am
Team,
I have 2 tables named datProduct, mapProduct2Vendor
Structure of these columns are as under:
datProduct
PID ProductName
1 Pen
2 Pencil
3 NotePad
mapProduct2Vendor
PID VID IsEnabled
1 1 1
1 2 1
2 1 1
2 2 1
3 1 1
Look into the sql script --------------------------------------------
SELECT P.PID, P.PName , M.VID
FROM
dbo.datProducts AS P
INNER JOIN
dbo.mapProduct2Vendor M
ON
P.PID=M.PID
-------------------------------------------------------------------
The o/p of the above script will be
PID PName VID
1 Pen 1
1 Pen 2
2 Pencil 1
2 Pencil 2
3 NotePad 1
Alls fine till now. But when we use a merge join in ssis and join these 2 sorted dataset (on PID) to the merge join with inner join as join type it only gives 3 rows.
PID PName VID
1 Pen 1
2 Pencil 1
3 NotePad 1
Can any body tell me what is missing?
Thanks in advance.
November 23, 2010 at 7:20 am
i tired using your example and it worked for me , By Merge Join(inner Join ) i get the same result you get using the T-SQL.
November 23, 2010 at 12:01 pm
Since you already know how to write the T-SQL statement, just ditch the Merge Join 🙂
The performance of your package will be grateful.
(but I must say, I'm intrigued why it doesn't work. But I can't give an explanation)
edit: just to be sure, the ID columns are defined as integer, right?
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply