select * from table_a
union all
select * from table_b
will give you all rows in table_a and table_b
select * from table_a
union
select * from table_b
will merge table_a and table_b and then do a distinct
Daniel, can you please state what it is you are trying
to accomplish, and give some indication as to the data
volumes in play on the two sources. High volumes will
be handled differently from small volumes, as they
often require a more elegant solution. Feel free to
post this on
www.dsxchange.com if you want to share
with that community.
-Ken
--- Alex Martins wrote:
> Sorry Daniel,
> I almost disagree. Union can remove duplicated rows
> in the 2 sets; just Union All includes them.
>
> Tks for the union example indication.
>
>
> -----Mensagem original-----
> De: Sutton, Daniel A
> [mailto:
daniel.a.sutton@boeing.com]
> Enviada: qua 18/02/2004 19:06
> Para: DataStage Users Discussion List
> Cc:
> Assunto: RE: UNION?
>
>
>
> Sorry Ray. I disagree. A UNION is the
> concatenation of two tables, that have the same
> columns. It inherently has nothing to do with
> duplicate rows, although this process may create
> duplicate within the resultant table.
>
> Searching dsxchange is a good idea, since there is
> a solid example of how to use DS designer to do
> this.
>
> Daniel A. Sutton Associate Technical Fellow,
> Boeing Navigator
> Hierarchical Databases, Data Warehouse, and
> Migration Control Group
>
> To be in a dialogue, we must listen from where the
> other person speaks.
> Otherwise, we only have two monologues
>
> Boeing Philadelphia IS/Data Management
> 610-591-7124 610-591-7524(fax) 800-946-4646
> pwd 1499533(beeper)
>
> email:
daniel.a.sutton@boeing.com
>
> Regular Mail Address:
> Boeing
> PO Box 16858 MS-P29-29
> Philadelphia PA 19142-0858
>
>
>
>
> -----Original Message-----
> From: Ray Wurlod [mailto:
rayw@mindless.com]
> Sent: Tuesday, February 17, 2004 2:43 PM
> To: DataStage Users Discussion List
> Subject: RE: UNION?
>
>
> A UNION is the elimination of duplicates. Search
> the archives (
www.dsxchange.com) for these terms.
> It is better, if possible, to form the UNION before
> the rows reach DataStage, because that was DataStage
> will have the smallest possible number of rows to
> process.
> _______________________________________________
> datastage-users mailing list
>
datastage-users@oliver.com
>
>
http://www.oliver.com/mailman/listinfo/datastage-users
>
>
> > _______________________________________________
> datastage-users mailing list
>
datastage-users@oliver.com
>
http://www.oliver.com/mailman/listinfo/datastage-users
>
__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools
_______________________________________________
datastage-users mailing list
datastage-users@oliver.com
http://www.oliver.com/mailman/listinfo/datastage-users