Re: Use of Union

From: JRStern <JRStern_at_gte.net>
Date: Mon, 26 Mar 2001 15:59:31 GMT
Message-ID: <3abf66fa.3331390_at_news.gte.net>


On Mon, 26 Mar 2001 16:50:14 +0200, "bpfh" <daniel_page_at_yahoo.fr> wrote:
>A part from one of the sides in the American Civil War, what is a union? I
>do not understand the explanation, or the code (or the code result in
>Access)...

select

    name, address, 'm' as gender
  from tblBoys

UNION select

    name, address, 'f' as gender
  from tblGirls

order by name, gender, address

The question being, of course, why the boys and girls were in different tables to begin with. Well, perhaps there are lots of fields for boys only, and lots of others for girls only, and for pedagogical reasons you didn't normalize the common fields into a separate table.

J. Received on Mon Mar 26 2001 - 17:59:31 CEST

Original text of this message