Posted by Ed Murphy on 06/11/07 23:15
jb1 wrote:
> I am trying to create a DTS package.
> I have two tables tbl_A and tbl_B with similar data/rows but no
> primary keys.
> tbl_A is master.
>
> I would like this package to query tbl_A and tbl_B and find
> 1)all rows in tbl_A that are different in tbl_B, 2)all rows in tbl_A
> that are not present in tbl_B and
> 3)all rows in tbl_B that are not present in tbl_A, and then just show
> those rows.
In the absence of primary keys, what conceptual rule do you use to
associate rows in tbl_A with rows in tbl_B? For instance, consider
this hypothetical data:
[tbl_A]
col1 | col2
-----+-----
1 | 2
3 | 4
[tbl_B]
col1 | col2
-----+-----
1 | 4
3 | 2
What associations would you draw here, and why?
> Can this be done with a simple UNION?
>
> Perhaps this could produce a temp Table that can be dropped once the
> DTS package exists successfully.
Why not a view?
[Back to original message]
|