Append External Data to query? URGENT

mehulkar

New member
Local time
Today, 02:51
Joined
Sep 4, 2009
Messages
2
Hi,

I have three tables: (1) Sales and (2) Sale Details (3) Slabs

(1) Sales Fields
- ID (primary key)
- Invoice Number
- Customer ID
- Date

(2) Sale Details Fields
- ID (primary key)
- Sale ID (foreign key to Sales)
- Slab ID (foreign key to Slabs)
- Rt/SqFt (price)

(3)Slabs Fields
- ID (primary key)
- Serial Number
- Color ID
- Thickness ID
- SqFt

All my data was/is external in excel files.

I have imported all data into Table (1) Sales and (3) Slabs.

Now I need to import data into Table (2) Sale Details. The problem is that my external data is with Invoice Number, Serial Number, Rt/Sqft.

How can I import it in?

Please help!! Urgent!
 
import your second table as is, then with a query bring together the fields you need (edit: in the first instance you will need to join InvoiceNumber with InvoiceNumber rather than InvoiceID - BUT chose InvoiceID to display, and ONLY display those fields you want in the 'real' second table). once you see the data you want to appear as the 'real' second table, change that select query into a 'make table' query and run.

now create the appropriate relationships in the relationship window and make sure it all makes sense to you.

then delete the imported second table (as opposed to the 'real' second table).
 
Hi, thanks for the answer.

How do you do a make table query?
 
depends on the version of access you are using. in 2007, there are buttons in the ribbon in design view of the query. one of those buttons is "make table" - the menus in 2003 and earlier may be similar, but i don't have those on my PC, so you may just have to use your eyes!

- just remember, there's a FUNDAMENTAL difference between the first two buttons on the ribbon below ("view" and "run") think of "view" as 'preview' and "run" as 'commit to changes'. so make sure you 'view' your make-table query first to make sure it has all the records you need (make sure ALL the records are there, queries have a habit of missing records if you don't set them up properly (usually play with the join properties between the tables in query view))

attachment.php
 

Attachments

  • changing select query to make-table query.jpg
    changing select query to make-table query.jpg
    65.9 KB · Views: 2,130

Users who are viewing this thread

Back
Top Bottom