Wondering if there is a way to insert a row into a table from another, with exception of one column?
This is of course easy with a limitied amount of columns, but gets k
Create a VIEW with required number for columns.
Assume Tbl1 has 4 columns. Create a view with required columns. Here Col1 has been excluded.
CREATE VIEW V1 AS
SELECT col2, col3, col4
FROM TBL1
Use the VIEW for Inserting. Col1 value for TBL2 will be current date, for other columns, the values will be from view V1 ie., col2, col3, col4 from TBL1
INSERT INTO TBL2
SELECT GETDATE(), *
FROM V1
This way you dont need to specify all the columns each time.
Hope it helps