hiii, i am executing the following stored procedure but having errors...
create procedure check_returns @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_Sold 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
the error coming is....
Msg 8114, Level 16, State 5, Procedure check_returns, Line 0
Error converting data type varchar to datetime.
plz let me know the exact changes and the line no. where to place the changes
sukriti1116
0
Newbie Poster
Recommended Answers
Jump to PostHello sukriti, just a bit of advice as you are new here.
If you could please seperate your comments and your code by using the code button supplied in the forum post editor, this will allow people to more quickly identify the issue instead of trying to seperate code from …
All 3 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.