Problem with timestamp by copying data

lape
lape Member Posts: 19
Hi,
i want to create a copy of table data via sql. But I have a problem when I want to insert the data in another table.
I tried
INSERT INTO table2 (column1, column2, column3, ...)
SELECT column1, column2, column3, ...
FROM table1
WHERE condition;

Answers

  • ma7eoo
    ma7eoo Member Posts: 7
    Hi,
    What error message do you get?
    Programmer from Poland.
  • Slawek_Guzek
    Slawek_Guzek Member Posts: 1,692
    Skip the timestamp column in your INSERT and SELECT column lists.

    The timestamp column is maintained automatically by the SQL Server, its value cannot be specified in any INSERT/UPDATE query
    Slawek Guzek - www.yitron.co.uk
    Business Central, MS SQL Server, Wherescape RED;