append problem

M

mita

I have two tables one for year 2000 and one for 2001
ill just show you the sample data

table 1(2000)

company_name service_code vol jan vol feb......vol dec
abc 123 1 12 33
124
.........................................


table 2 (2001)
company_name service_code vol jan volfeb..................
rrr 123 4 5

what i want is to append the table 1 with table 2 values but how do i add
the volumes from table 2 to table 1 as the year is different and the values
are also different..........


pls help
 
D

Delordson Kallon

Create a normal select query in design view with table 2. Add all the fields
(except any autonumber fields) from table 2 to the grid. From the menu, click
on Query > Append query..., then select table 1 from the dropdown list. This
will convert your select query into an append query and will include a
'Append To' row in the design grid (just above the first criteria row). Each
field in the append to row has a dropdown list from which you can choose the
field you want to append the data to. Select your field names as appropriate
then run the query (by clicking on the exclamation mark on the toolbar).

A couple of things to watch out for. Make sure the fields you are appending
have the same data types as the fields you are appending to and do not
include the autonumber field in the query.

Delordson Kallon
www.instantsoftwaretraining.com
 
M

mita

Hi Delordson
Thanks for your help...but does it solve my problem when i want to add the
volume columns to table 1 and append the rest of the rows from table 1 to
table 2??

what if i want to achieve this in sql server???

Please reply

Many thanks
 
D

Delordson Kallon

Hi,

The solution I described should give you a final table 1 that looks
something like this:

table 1(2000)

company_name service_code vol jan vol feb......vol dec
abc 123 1 12 33
rrr 123 4 5


If this is not what you are looking to achieve can you post a sample fo the
final table you need please.

Delordson Kallon
www.instantsoftwaretraining.com
 
M

mita

Hi
thanks for your help
I am looking to get something like this...

companyName service_id volJan03...volDec03 volJan04...volDec04..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top