Greetings,
I have a INSERT sp that just copies a few lines from one table into another. The problem I am hitting is that one of the fields in the target table is an ID field (this is from when the table started its life in MS Access and used Autonumber). Obviously this field does not accept NULL values. How can I get the import process to automatically add the next sequential number in the ID field as part of this stored procedure?
USE [DashboardSQL-2K5]
GO
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[spAppendDataDebtors]
AS INSERT INTO dbo.src_tbl_debt
(site_ref, estate_name, amount, src_date)
SELECT site_ref, estate_name, amount, src_date
FROM dbo.Debtors$
Thank you in advance
I have a INSERT sp that just copies a few lines from one table into another. The problem I am hitting is that one of the fields in the target table is an ID field (this is from when the table started its life in MS Access and used Autonumber). Obviously this field does not accept NULL values. How can I get the import process to automatically add the next sequential number in the ID field as part of this stored procedure?
USE [DashboardSQL-2K5]
GO
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[spAppendDataDebtors]
AS INSERT INTO dbo.src_tbl_debt
(site_ref, estate_name, amount, src_date)
SELECT site_ref, estate_name, amount, src_date
FROM dbo.Debtors$
Thank you in advance