Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Append from one field into another in the same table

Status
Not open for further replies.

advpay

Programmer
Mar 22, 2000
57
US
Hi, in my Customers table I am converting certain fields into a new created field.<br><br>I created a select query that identifies the records and&nbsp;&nbsp;meets my criteria. I need to move/append them from the [Last Name] field to the [Company Name] field. <br><br><br>SELECT Customers.[First Name], Customers.[Last Name], Customers.CustomerID, Customers.[Company Name]<br>FROM Customers<br>WHERE (((Customers.[First Name]) Is Null));<br><br>Tried to change this to an append query but wouldn't work?<br><br>INSERT INTO Customers ( [Company Name] )<br>SELECT Customers.[Last Name]<br>FROM Customers<br>WHERE (((Customers.[First Name]) Is Null));<br><br>I'm getting the <br>Microsoft Access set 0 field(s) to Null due to a type conversion failure, and it didn't add 1502 record(s) to the table due to key violations, 0 record to all the other violations,...? help thanks<br><br><br><br><br><br><br>
 
Do an update query instead of Insert:<br>UPDATE Customers SET Customers.[Company Name] = [Customers].[Last Name];<br> <p>Sandeep Anand<br><a href=mailto:sandeep@matatechnologies.com>sandeep@matatechnologies.com</a><br><a href= Technologies</a><br>sign up for our free Discussion list: "Access Tips And Tricks" at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top