December 23, 2004 at 4:20 pm
I have the following SP:
CREATE PROCEDURE dbo.GenericWorkFlowSequence_Insert_One
(
@nvcGWFSName nvarchar(50),
@intGWFID int,
@nvcRoleID nvarchar(256),
@nvcASCU nvarchar(256)
)
AS
SET NOCOUNT OFF;
DECLARE @intGWFSSeqNbr int
SET @intGWFSSeqNbr= (select max(intGWFSSeqNbr)+100 from tblGenericWorkFlowSequence where intGWFID = @intGWFID group by intGWFID)
IF @intGWFSSeqNbr = NULL
BEGIN
SET @intGWFSSeqNbr = 0
END
INSERT INTO
tblGenericWorkFlowSequence
(
nvcGWFSName,
intGWFSSeqnbr,
intGWFID,
nvcRoleID,
dtASCD,
nvcASCU
)
VALUES
(
@nvcGWFSName,
@intGWFSSeqNbr,
@intGWFID,
@nvcRoleID,
getdate(),
@nvcASCU
)
GO
As you can see, I am setting the value to 0 if it is null but when I check the value, it still has nulls.
December 24, 2004 at 1:04 am
December 24, 2004 at 10:24 am
Worked like a charm. Thanks.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply