如何解决以下过程中的错误?
CREATE PROCEDURE cards
@salesman VARCHAR(10),
@RCV10 INT,
@RCV09 INT,
@RCV15 INT,
@GPRS15 INT,
@RCV20 INT,
@RCV25FTT INT,
@RCV25 INT,
@RCV31 INT,
@RCV30 INT,
@RCV35 INT,
@RCV50 INT,
@RCV55 INT,
@SIM INT,
@VTOPSIM INT,
@VTOPBAL INT,
@THREEGSIM INT,
@entrydate DATETIME
AS
BEGIN
IF EXISTS(
SELECT *
FROM CardsIssued
WHERE salesman = @salesman
AND RCV10 > @RCV10
AND RCV09 > @RCV09
AND RCV15 > @RCV15
AND GPRS15 > @GPRS15
AND RCV20 > @RCV20
AND RCV25FTT > @RCV25FTT
AND RCV25 > @RCV25
AND RCV31 > @RCV31
AND RCV30 > @RCV30
AND RCV35 > @RCV35
AND RCV50 > @RCV50
AND RCV55 > @RCV55
AND SIM > @SIM
AND VtopSim > @VTOPSIM
AND VtopBal > @VTOPBAL
AND ThreeGSim > @THREEGSIM
AND EntryDate = @entrydate
)
BEGIN
INSERT Cards_Returned
VALUES
(
@salesman,
@RCV10,
@RCV09,
@RCV15,
@GPRS15,
@RCV20,
@RCV25FTT,
@RCV25,
@RCV31,
@RCV30,
@RCV35,
@RCV50,
@RCV55,
@SIM,
@VTOPSIM,
@VTOPBAL,
@THREEGSIM,
@EntryDate
)
END
ELSE
PRINT'CARDS RETURNED CANNOT BE GREATER THAN CARDS ISSUED'
END
运行为:
execute cards 'S001',50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,50,'28/1/2013'
给出以下错误:
Msg 8114, Level 16, State 5, Procedure cards, Line 0
Error converting data type varchar to datetime