Solved

copy from one table to another in access

Posted on 2012-04-02
6
303 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
ID: 37799023
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
ID: 37799030
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
ID: 37799157
<Is there any nechanism in access to do this> Yes, the query i mentioned above
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 9

Author Comment

by:TonyReba
ID: 37799159
How do I run it
0
 
LVL 29

Accepted Solution

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

Author Comment

by:TonyReba
ID: 37799258
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

911 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

19 Experts available now in Live!

Get 1:1 Help Now