473,385 Members | 1,877 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Insert a field from a table to another.

I have to tables with different names, and I need to insert into the destination table a field from the origin table that has the same name as the field in the destination table.
Nov 29 '06 #1
6 1987
iburyak
1,017 Expert 512MB
Insert into destination_table (field1,field2)
Select field1, field2 from origin_table where .....
Nov 29 '06 #2
Insert into destination_table (field1,field2)
Select field1, field2 from origin_table where .....
Thank's, but still doesn't work. It says "field valuer required". Is there something missing, how would be the complete Syntax.

Thank's a lot.
Nov 29 '06 #3
iburyak
1,017 Expert 512MB
You have to give me table definitions and full statement executed so I would be able to help.
Nov 29 '06 #4
The structure of both tables is exactly the same. And right now i need to copy only one field of the origin table into the destination table. The field format is currency.

Do you need any more information?

Thank's.
Nov 30 '06 #5
Try aliases, this might be the cause if the fields from each table are the same

Insert into Table1(Field1, Field2)
Select table2.Field1, table2.Field0
From Table2
Where your code here
Nov 30 '06 #6
Thank's a lot!!!

That worked.
Nov 30 '06 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: PT | last post by:
I got a problem. And thats..... First of all, I got these three tables. ------------------- ------------------ ---------------------- tblPerson tblPersonSoftware ...
8
by: Bri | last post by:
Greetings, I'm having a very strange problem in an AC97 MDB with ODBC Linked tables to SQL Server 7. The table has an Identity field and a Timestamp field. The problem is that when a new record...
8
by: Carl | last post by:
Hi, I hope someone can share some of their professional advice and help me out with my embarissing problem concerning an Access INSERT query. I have never attempted to create a table with...
5
by: robecflo | last post by:
Hi Forum, i have a problem, hope somebody can give me ideas. I'm developing with windows forms and vb.net, and oracle as a database. At this moment i have a table called amortizaciones, this table...
1
by: spacejones | last post by:
I am currently using as my database Access 2002. I have a table which holds orders for certain products. Given that each record in this table has a quantity ordered field. I want to populate...
3
by: MP | last post by:
Hi Posted this several hours ago to another ng but it never showed up thought i'd try here. using vb6, ado, .mdb, jet4.0, no access given table tblJob with field JobNumber text(10) 'The...
0
by: sadiewms | last post by:
I'm trying to get data from one table into another. The data in the first table - Table A - is something like this: personfn, personln; personfn, personln; personfn, personln I would like to...
1
by: Jan | last post by:
I have a table with autoincrement unique ID plus name (required not to be blank) and other fields. I have a list of names in another table and would like to do insert to the name field of the...
21
by: Killer42 | last post by:
Hi all. I’m almost embarrassed to ask this one, but in fact most of my dabbling in Access has been at a fairly simple level, via the GUI. Now I need to do something slightly deeper, and don’t know...
0
by: Ron | last post by:
Hi All, I've got a table called tblTransactions. With a couple different forms, I allow users to add/update records in that table. Within the table there's a PK called transactionID. ...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.