I would like to insert data into one table, from selected data from another. For example, I'm doing this:
INSERT INTO Customers (CustomerName, Country)
SELECT SupplierName, Country FROM Suppliers;
For example,
It the select statement would return, and insert:
Robert USA
Richard Germany
Pat USA
This works fine.
What i'm looking to do now, is populate a datetransfered column that is not part of the suppliers table. The date will just be today (getdate)
The insert statement would be:
insert into Customer(CustomerName, Country, datetransfered)
How would I add the 'datetransfered' portion as "Today's Date" (GetDate) for each row returned in the select statement?
I'd like it to insert:
Robert USA 9/2/15
Richard Germany 9/2/15
Pat USA 9/2/15