You are here: Re: MSSQL - DTS Package - Find distinct rows - Output to TXT file - ActiveX? « MsSQL Server « IT news, forums, messages
Re: MSSQL - DTS Package - Find distinct rows - Output to TXT file - ActiveX?

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?

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация