• When I started programming SQL Server stored procedures, I also did not use the autoincrement feature. So I created a stored procedure nextvalue which returned a new ID.

    Everytime I wanted to insert a record I coded EXECUTE nextvalue @NewID OUTPUT. Using a SQL statement like INSERT INTO table_x SELECT col1,col2 FROM ... was impossible.

    Took me some time to correct this situation with the IDENTITY columns.

    Hope you will not make the same error.

    Gerry S.


    Dutch Anti-RBAR League