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

I want to copy data from table to table. 2

Status
Not open for further replies.

debyteky

Technical User
Mar 25, 2004
3
US
I'm just learning to use Access and I want to copy information from 1 table to another. Both tables are in the same database. I don't know very much about Access. I have figured out how to create expressions to do calculations. I don't have any relationships between my tables. I don't really know what that's for either.
 
First sort out in your mind WHY you would ever want do duplicate data in the first place.

The whole point about relational databases is that you store the data ONCE.

If you need the data in another place then REFER to it.
( Thats what relationships between tables is for )



I suggest you do a search on the internet for:-
Normalisation ( Normalization is you are from the colonies )
CODD's Laws
Normal Form ( 1st, 2nd and 3rd )

you'll then understand what I'm talking about - any you'll be able to apply it to ALL relational databases - this is not specifically an Access thing.


'ope-that-'elps.



G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.
 
Design a query that selects the fields you want to transfer. Then select append query from the query type menu icon and tell Access the name of the table you want to copy the data to. Access will fill-in target field names if they are identical otherwise you'll have to fill them in. Then press the button.

 
So can I use the Query wizard and select my main table that I want the to populate date to the other tables to design a query? Remeber I'm new at this. I only "learned" this stuff last week.
 
I've not used the query wizard. It will probably do this but I suggest you need at minimum to know how to use the query screen ie Query>>New>>Design View. If you don't, get a manual. The one that came with my copy of Access was 1300 pages. Access takes more than a week to learn.

 
Deby
Why do you want to copy data from one table to another? Lets start with that then we can go from there-don't worry, I too have been thrown in at the deep end many times-I know how frustrating it can be!
 
there's a paper on TT JeremyNYC's website in the developer's section, 'Fundamentals of Database Design'


that explains relational database and why it's important to NOT duplicate data in your tables. Bad idea.

HTH
leslie
 
This is what I have:
Access database with 5 tables; Member Information - contains MemberID,LastName, FirstName, Address etc
Payment Information - contains PaymentID, MemberID, PaymentType, CreditCardNumber, ExpirationDate, etc
Product Table - contains MemberID, ProductID, ProductName, UnitPrice
SalesInformation - contains all of the above information
ShippingInformation - contains ShippingID, MemberID, LastName, FirstName, ShippingAddress, etc.
What I want to do take the relvent information from the Sales Information table and copy it into the corresponding fields in the Payment, Shipping, Product and Sales tables. For example, I want to only type in the Credit card number once and it go into the Payment Information table automatically, and so on and so forth.
 
Again, why would you want to do this?

If you need the credit card number go to the payment table and get it, if you also need the person's name, join to the member table on memberID and get the person's name.

SELECT LASTNAME, FIRSTNAME, CREDITCARDNUMBER FROM
tblPaymentInfo
INNER JOIN tblMember on tblPaymentInfo.MemberID = tblMember.MemberID

There you go, you've got the person's full name and credit card number without having any duplicate data ANYWHERE.

Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top