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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

combining two tables

Status
Not open for further replies.

abhishekpant

Programmer
Dec 21, 2004
38
0
0
US
Hello
Access/cr10
Data
company name member name associate name
citibank citibank sears
citibank citibank baramex
chase chase bankone

i have to combine these three table and get one new table

expected result

client name
citibank
citibank
chase

* when associate name is different from member name then it should read the member name(in the data member name is same as company name)
 
You state "when associate name is different from member name then it should read the member name", but not what is to be done if they are the same... Adn where are the 2 tables, I see 3 columns.

I would suggest doing this in Access within a query (create a Union Query), and then base the report off of the Access Query.

You can also use the Add Command to build out a Union Query.

What's sort of strange to me is that this appears to be 3 columns that need to be combined, not 2 tables.

Here's an example of combining 2 tables which have common columns:

select 'table1' source, company, member, associate from table1
union all
select 'table2' source, company, member, associate from table2

Now you'll get a single table with all entries, plus a column called source which shows which table it came from.

-k
 
i am very sorry .
i am so confused atb this time .i have to add to column not two tables..

abhishek
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top