Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Need ur urgent help plzzz

0 views
Skip to first unread message

tamerelrefaie

unread,
Jul 15, 2007, 8:14:01 PM7/15/07
to
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 ??? :(:(:(

Chris2

unread,
Jul 15, 2007, 9:34:58 PM7/15/07
to

"tamerelrefaie" <tamere...@discussions.microsoft.com> wrote in message
news:5A90F7A4-26F3-477E...@microsoft.com...


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.


Bob Quintal

unread,
Jul 15, 2007, 7:43:34 PM7/15/07
to
=?Utf-8?B?dGFtZXJlbHJlZmFpZQ==?=
<tamere...@discussions.microsoft.com> wrote in
news:5A90F7A4-26F3-477E...@microsoft.com:

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

'69 Camaro

unread,
Jul 15, 2007, 8:41:35 PM7/15/07
to
Chris, what's wrong with this picture when you see it on your computer?

http://www.time.gov/timezone.cgi?Mountain/d/-7/java

HTH.
Gunny


"Chris2" <rainofstee...@GETRIDOF.luminousrain.com> wrote in message
news:Du6dnZl3i7vOIQfb...@comcast.com...


tamerelrefaie

unread,
Jul 15, 2007, 8:56:00 PM7/15/07
to
Thanks alot Bob,
really I can't thanks u enough. there is still another small part
which is
how can I get the max. income from all these incomes and the related data to
it???

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

> ....

Chris2

unread,
Jul 15, 2007, 10:37:36 PM7/15/07
to

"'69 Camaro" <ForwardZERO_SP...@Spameater.orgZERO_SPAM> wrote in message
news:eeM6UI0x...@TK2MSFTNGP02.phx.gbl...

> Chris, what's wrong with this picture when you see it on your computer?
>
> http://www.time.gov/timezone.cgi?Mountain/d/-7/java
>
> HTH.
> Gunny
>

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.


Chris2

unread,
Jul 15, 2007, 9:47:20 PM7/15/07
to

"Chris2" <rainofstee...@GETRIDOF.luminousrain.com> wrote in message
news:icudneA4-pSfVgfb...@comcast.com...

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.


'69 Camaro

unread,
Jul 15, 2007, 9:50:13 PM7/15/07
to
Hi, Chris.

> 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:

http://groups.google.com/group/microsoft.public.access/browse_thread/thread/fbdb4e6dbbe7c84a/7f6ba28f41584a0d?lnk=st&q=&rnum=1&hl=en#7f6ba28f41584a0d

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.


'69 Camaro

unread,
Jul 15, 2007, 9:51:30 PM7/15/07
to
Hi, Chris.

> Oddly enough, my timezone on my computer timezone was set for Pacific,
> even though I'm
> Mountain time.

Ah. That explains it.

0 new messages