let's say xyz is in table 1 his income is $200
and same xyz in table 2 has income $500
and so on with the other data
so I want to build a query on all these tables and group clients with same
name to show their data and compare them???
Although there isn't any relationship between them (how can I make relation
in this case?)
How can I do all this ??? :(:(:(
tamerelrefaie,
SELECT X1.Income
FROM xyz AS X1
UNION ALL
SELECT A1.Income
FROM abc AS A1
UNION ALL
<etc.>
It will be a resource hog if running against ten tables.
Run your queries against the query above.
Dropping ALL if you wish to eliminate duplicates.
Comments:
Since the table structures are identical and have effectively identical data, you want to
put all of that into one table.
The following should be attempted only a copy of your database, of course.
You're going to want to identify a primary key, create it on the one table you'll keep,
and then load the data rest of the data from remaining tables into the one table.
Sincerely,
Chris O.
Don't make relations.
Create an UNION QUERY as follows
SELECT 1 AS SoucrceTable, * from table1
UNION ALL
SELECT 2 AS SoucrceTable, * from table2
UNION ALL
SELECT 3 AS SoucrceTable, * from table2
...
Until you have all the tables.
You can then open the query and sort by any field you want.
--
Bob Quintal
PA is y I've altered my email address.
--
Posted via a free Usenet account from http://www.teranews.com
http://www.time.gov/timezone.cgi?Mountain/d/-7/java
HTH.
Gunny
"Chris2" <rainofstee...@GETRIDOF.luminousrain.com> wrote in message
news:Du6dnZl3i7vOIQfb...@comcast.com...
and again many thanks
"Bob Quintal" wrote:
> =?Utf-8?B?dGFtZXJlbHJlZmFpZQ==?=
> <tamere...@discussions.microsoft.com> wrote in
> news:5A90F7A4-26F3-477E...@microsoft.com:
>
> > I've imported about ten tables in Access 2003 from text files,
> > with no primary keys, but they are same exact design
> > (structure) in all of them. data maybe repeated with different
> > values.
> >
> > let's say xyz is in table 1 his income is $200
> > and same xyz in table 2 has income $500
> >
> > and so on with the other data
> >
> > so I want to build a query on all these tables and group
> > clients with same name to show their data and compare them???
> > Although there isn't any relationship between them (how can I
> > make relation in this case?)
> >
> > How can I do all this ??? :(:(:(
> >
> Don't make relations.
>
> Create an UNION QUERY as follows
>
> SELECT 1 AS SoucrceTable, * from table1
> UNION ALL
> SELECT 2 AS SoucrceTable, * from table2
> UNION ALL
> SELECT 3 AS SoucrceTable, * from table2
> ....
Gunny,
I see a digital clock ticking.
It shows the correct time. Right now it is showing, 19:33.
I am not sure how to determine what might be wrong with it in the context of your
question.
Why do you ask?
Sincerely,
Chris O.
Oddly enough, my timezone on my computer timezone was set for Pacific, even though I'm
Mountain time. I can't recall having changed this setting in years, as far back as 2002,
probably. I have no idea how it was set to that. The relative timezone adjustment plus a
time that didn't match the timezone was probably throwing off the apparent posting time.
Sincerely,
Chris O.
> It shows the correct time. Right now it is showing, 19:33.
>
> I am not sure how to determine what might be wrong with it in the context
> of your
> question.
>
> Why do you ask?
All of your posts are an hour ahead:
HTH.
Gunny
See http://www.QBuilt.com for all your database needs.
See http://www.Access.QBuilt.com for Microsoft Access tips and tutorials.
Blogs: www.DataDevilDog.BlogSpot.com, www.DatabaseTips.BlogSpot.com
http://www.Access.QBuilt.com/html/expert_contributors2.html for contact
info.
> Oddly enough, my timezone on my computer timezone was set for Pacific,
> even though I'm
> Mountain time.
Ah. That explains it.