Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

2 tables into 1 ?

Status
Not open for further replies.

DCMNBD

Technical User
Jan 26, 2005
6
TG
Hi,
I have the following 2 tables:

Table1

R T B A
LONDON 1 5 3
LONDON 5 7 2
LONDON 1 8 5
LONDON 3 9 4
PARIS 2 78 4
PARIS 2 74 14
PARIS 4 88 11
PARIS 1 45 22
PRAGUE 1 46 4
PRAGUE 2 55 21
PRAGUE 2 22 10
PRAGUE 3 22 8

and
Table2
R H
LONDON 0
LONDON 1
LONDON 2
LONDON 3
PARIS 0
PARIS 1
PARIS 2
PARIS 3
PRAGUE 0
PRAGUE 1
PRAGUE 2
PRAGUE 3

I want to put them into 1 table as followed :

R T B A H
LONDON 1 5 3 0
LONDON 5 7 2 1
LONDON 1 8 5 2
LONDON 3 9 4 3
PARIS 2 78 4 0
PARIS 2 74 14 1
PARIS 4 88 11 2
PARIS 1 45 22 3
PRAGUE 1 46 4 0
PRAGUE 2 55 21 1
PRAGUE 2 22 10 2
PRAGUE 3 22 8 3

column H is from table2.
Thanks.
 
What have you tried so far?

It's easy to say to just make a new field "H" and just paste the data in there, but how do you know which row from table 2 belongs with each row from table one? Is there always only exactly four rows for each city, and you simply want the items from table 2 to just be inserted into table 1 in the order that they are currently in?

If it's that easy, which I'm guessing it's not, just make a new column "H", go into table 2, select column H, hit EDIT-COPY, go back to table 1, choose column H, and hit EDIT-PASTE.

Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top