Solved

copy from one table to another in access

Posted on 2012-04-02
6
308 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 120

Assisted Solution

by:Rey Obrero (Capricorn1)
Rey Obrero (Capricorn1) 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 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 37799157
<Is there any nechanism in access to do this> Yes, the query i mentioned above
0
Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

 
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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Suggested Solutions

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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.

752 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