User57520091 posted
Hi, I am trying to create a new SProc for inserting data when I hit this error after trying to execute:
Operand type clash: time is incompatible with date
Please kindly advice. Thanks!
USE [Matrix]
GO
/****** Object: StoredProcedure [dbo].[Campaign_Add] Script Date: 10/14/2011 18:18:17 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[Campaign_Add]
(
@Code nvarchar(50) =NULL,
@Name nvarchar(150) =NULL,
@Type nvarchar(50) =NULL,
@ActiveDateFrom Time =NULL,
@ActiveDateTo Time =NULL,
@AddedBy nvarchar(50) =NULL,
@AddedOn datetime =NULL
)
AS
BEGIN
INSERT INTO [Cam]
(
, [Name] , [Type] , [ActiveDateFrom] , [ActiveDateTo] , [AddedBy] , [AddedOn]
) VALUES (@Code , @Name , @Type , @ActiveDateFrom , @ActiveDateTo , @AddedBy , GETDATE() ) ;SELECT SCOPE_IDENTITY(); END
|