Works fine in SSMS, but this column will not increment in Studio for SS. The number of QuoteQtyPK is set to 2 no matter how many records are in the table, and never increments, therefore the insert of course fails. Actually I think it should increment as soon as the insert is started, even before any data is entered, but doesn't. It's always 2. This is not a situation of the insert failing due to bad data.
Code: Select all
CREATE TABLE [QuoteTool1.1].dbo.tblQuoteQty(
QuoteQtyPK INT IDENTITY,
QuotePK INT NOT NULL,
Qty SMALLINT NOT NULL DEFAULT (0),
Kind TINYINT NOT NULL DEFAULT (0),
Split TINYINT NOT NULL DEFAULT (0),
CONSTRAINT PK_tblQuoteQty2 PRIMARY KEY (QuoteQtyPK)
) ON [PRIMARY]
GO
Thanks.