If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Adding records to a table
I have a table consisting of several fields, where one is a customerID. I
would like to repeat all records for one customerID in the table, but changing the customer ID for the new records. How can I use the query command to complete ths task? |
#2
|
|||
|
|||
TRANSFORM Sum(Table17.Amount) AS SumOfAmount
SELECT Table17.Building FROM Table17 GROUP BY Table17.Building PIVOT Table17.RentOrCam; "Petterq" wrote: I have a table consisting of several fields, where one is a customerID. I would like to repeat all records for one customerID in the table, but changing the customer ID for the new records. How can I use the query command to complete ths task? |
#3
|
|||
|
|||
Hi,
INSERT INTO tableName (CustomerID, listOfOtherFIelds) SELECT 202020, ..., ...., ... FROM existingTable WHERE CustomerID=101010 would insert the records for CustomerID=101010, but with 202020 as CustomerID value. Hoping it may help, Vanderghast, Access MVP "Petterq" wrote in message ... I have a table consisting of several fields, where one is a customerID. I would like to repeat all records for one customerID in the table, but changing the customer ID for the new records. How can I use the query command to complete ths task? |
#4
|
|||
|
|||
Hello.
So this has to be programmed in SQL? I can not use the add records query? "Michel Walsh" wrote: Hi, INSERT INTO tableName (CustomerID, listOfOtherFIelds) SELECT 202020, ..., ...., ... FROM existingTable WHERE CustomerID=101010 would insert the records for CustomerID=101010, but with 202020 as CustomerID value. Hoping it may help, Vanderghast, Access MVP "Petterq" wrote in message ... I have a table consisting of several fields, where one is a customerID. I would like to repeat all records for one customerID in the table, but changing the customer ID for the new records. How can I use the query command to complete ths task? |
#5
|
|||
|
|||
Hi,
It can. Use a constant, 202020, rather than a field name, in the first line, as value, and in the line Append To, use the CustomerID field name. For the other fields, use, in the first line, the table supplying the values and, in the Append To line, the field name of the table receiving the new records. Hoping it may help, Vanderghast, Access MVP "Petterq" wrote in message ... Hello. So this has to be programmed in SQL? I can not use the add records query? "Michel Walsh" wrote: Hi, INSERT INTO tableName (CustomerID, listOfOtherFIelds) SELECT 202020, ..., ...., ... FROM existingTable WHERE CustomerID=101010 would insert the records for CustomerID=101010, but with 202020 as CustomerID value. Hoping it may help, Vanderghast, Access MVP "Petterq" wrote in message ... I have a table consisting of several fields, where one is a customerID. I would like to repeat all records for one customerID in the table, but changing the customer ID for the new records. How can I use the query command to complete ths task? |
#6
|
|||
|
|||
and don't forget to add the criteria for the table supplying new data, it
should be limited to those CustomerID = xyz |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Access combo box-show name, not ID, in table? | write on | New Users | 30 | April 30th, 2005 09:11 PM |
adding records from another table via SQL Mk. II | TB | General Discussion | 7 | March 29th, 2005 06:24 AM |
Here's a shocker | Mike Labosh | General Discussion | 2 | October 26th, 2004 05:04 PM |
Table Wizard Does Not Set Relationship if Foreign Key and Primary Key Name Do Not Match Exactly in Case. | HDW | Database Design | 3 | October 16th, 2004 03:42 AM |
COMPARE THE TWO TABLES | Stefanie | General Discussion | 0 | June 4th, 2004 04:36 PM |