[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


Insert Statement

Posted on 2015-01-07
Medium Priority
Last Modified: 2015-01-07

Will a INSERT statement work for taking a record from one table to another?
Question by:Jass Saini
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
  • 4
  • 3
  • 2
  • +1
LVL 19

Expert Comment

by:Eric Sherman
ID: 40536059
Yes, can you be a little more specific in what you are trying to accomplish.

LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 40536061

Insert into tablex(f1,f2)
select f1,f2 from tableY
LVL 18

Expert Comment

ID: 40536069
Insert into tbl1 (txtCol)
select txtAnotherCol from tbl2

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.


Author Comment

by:Jass Saini
ID: 40536082
Would it be okay to insert from one table to another when the col are different or do they have to be the same.  Where in the property should the action happen?
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 40536114
the names of columns may not be the same, BUT the number of columns must be the Same and the Data types must be the same.
LVL 18

Assisted Solution

Simon earned 1000 total points
ID: 40536115
The order of the values clause and the select clause are what matters

insert into t1 (col3,col1)
select col2,col4 from t2

In this case col2 gets inserted in col3 of the table t1 and col4 gets inserted into col1 of t1.

Datatypes should be the same or coercible (e.g. numeric to string, but not alphanumeric string to numeric);.

Author Comment

by:Jass Saini
ID: 40536149
So should I use a COPY button to to copy that over...also...sorry forget this ..

Some of my fields that I need to copy are on the main form and others are the sub form.  Will that be okay?
LVL 120

Accepted Solution

Rey Obrero (Capricorn1) earned 1000 total points
ID: 40536210
omg,,, @JAss SAini
please stick to the original problem that you posted..
when you got a solution, close the thread AND OPEN a new question for another problem.

Author Comment

by:Jass Saini
ID: 40536223
OK Thank you Rey...it is still part of the same problem.

Author Closing Comment

by:Jass Saini
ID: 40536224
Thank you

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Access custom database properties are useful for storing miscellaneous bits of information in a format that persists through database closing and reopening.  This article shows how to create and use them.
This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

649 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