Solved

copy from one table to another in access

Posted on 2012-04-02
6
302 Views
Last Modified: 2012-04-02
I was given a table on access database that need to be exported into an existing database in access , the column names are different but the data will fit into the existing table,  there are however columns that will remain null.


How would I do this?  I cannot select copy past since the data is not same order,,,
0
Comment
Question by:TonyReba
  • 3
  • 2
6 Comments
 
LVL 119

Assisted Solution

by:Rey Obrero
Rey Obrero earned 200 total points
Comment Utility
you will need to create a query against the source table that will match the fields of the destination table.

if you find it difficult to do this, upload a copy of the source db and destination db.
0
 
LVL 9

Author Comment

by:TonyReba
Comment Utility
I have both tables now in a same database.

But I need to copy fields from table 2 to table 1,

Is there any nechanism in access to do this , do I have to create a custom query???
0
 
LVL 119

Expert Comment

by:Rey Obrero
Comment Utility
<Is there any nechanism in access to do this> Yes, the query i mentioned above
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 9

Author Comment

by:TonyReba
Comment Utility
How do I run it
0
 
LVL 29

Accepted Solution

by:
IrogSinta earned 300 total points
Comment Utility
Insert this in a query SQL view.
INSERT INTO DestinationTable (NameOfColumn1, NameOfColumn2) SELECT NameOfSourceColumn1,  NameOfSourceColumn2 FROM SourceTable
0
 
LVL 9

Author Comment

by:TonyReba
Comment Utility
got it this is the query used:

INSERT INTO tbl_Providers(Provider_Type,Group_Business_Name,Address,Address2,City,State,Zip)
SELECT
ProviderType,
PHARM_NAME,
Address1,
Address2,
CITY,
STATE,
ZIP_CD_5 FROM s ;
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
If you have heard of RFC822 date formats, they can be quite a challenge in SQL Server. RFC822 is an Internet standard format for email message headers, including all dates within those headers. The RFC822 protocols are available in detail at:   ht…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now