TIP: Click on subject to list as thread! ANSI
echo: nthelp
to: Adam Flinton
from: Chris Robinson
date: 2003-05-08 10:48:44
subject: Re: SQL Help

From: Chris Robinson 

Thanks for the tip - it didn't like it though :o(  Instead I created a
macro that wipes a table, adds one set of values to it and then appends the
next set
- I then query this table.

Everything else just merged the two fields inito one which wasn't what I was after.

Thanks anyway,
Chris.

Adam Flinton wrote:

> Union possibly union all.
>
> I think Access'es SQL supports Union but I haven't a copy to hand....
>
> If you want just unique records then do a select distinct
>
> Adam
>
> Chris Robinson wrote:
> > Is this the right place to post this? I hope so.
> >
> > I'm writing a database in Access 2000 atm and I was hoping to get a bit
> > of an SQL pointer.  It's probably an easy one although I can't think of
> > a way to do it in a query atm.
> >
> > I have two tables (X and Y), each with a column that contains a 4 digit
> > code.  I want to create a query that brings the data from these TWO
> > columns into ONE column.  I don't want to merge the data - it's more a
> > case of take the values from table X and append the values from table Y.
> >
> > The nearest I got was:
> >
> > SELECT (xTBL.code & yTBL.code) AS code_list
> > FROM xTBL, yTBL;
> >
> > This actually does merge the fields of the two tables though (i.e. both
> > field values in one field)  I tried GROUPBY's and SELECT DISTINCT but my
> > SQL skills aren't exactly up there.  The next thing I'm thinking of is
> > doing, if this can't be done this way, is an add query (to a table) for
> > the xTBL field and then an append query to the same table for the yTBL
> > field.
> >
> > Thanks in advance,
> > Chris.
> >
> >
> >

--- BBBS/NT v4.01 Flag-4
* Origin: Barktopia BBS Site http://HarborWebs.com:8081 (1:379/1.45)
SEEN-BY: 633/267 270
@PATH: 379/1 633/267

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.