T
TB
Hi all:
I am trying to add new records to a table in Access based on content from
another table via SQL.
Since the generic SQL for adding a record is: "INSERT INTO mytable(column1,
column2) VALUES (value, value)", I thought I would be possible to do
something like this:
INSERT INTO newcustomers (customer, customergroup) values (SELECT IDcustomer
FROM customers, 7)
What I am trying to achieve here is to add new records to newcustomers,
populating the column customer with the values from IDcustomer in the table
customers and populating the column customergroup with the value 7. The
total number of records to add to newcustomers should be the equivalent of
the total number of records in customers.
However, somehow I am not getting the SQL statement right.
Any suggestions would highly appreciated.
Thanks
TB
I am trying to add new records to a table in Access based on content from
another table via SQL.
Since the generic SQL for adding a record is: "INSERT INTO mytable(column1,
column2) VALUES (value, value)", I thought I would be possible to do
something like this:
INSERT INTO newcustomers (customer, customergroup) values (SELECT IDcustomer
FROM customers, 7)
What I am trying to achieve here is to add new records to newcustomers,
populating the column customer with the values from IDcustomer in the table
customers and populating the column customergroup with the value 7. The
total number of records to add to newcustomers should be the equivalent of
the total number of records in customers.
However, somehow I am not getting the SQL statement right.
Any suggestions would highly appreciated.
Thanks
TB