Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
abdbari
Starting Member
7 Posts |
Posted - 2013-03-28 : 00:14:27
|
i got the error :Kindly assist.An insufficient number of arguments were supplied for the procedure or function dbo.findEmployerPercentageThe script as below:alter function findEmployerPercentage(@joindt datetime, @salary numeric)RETURNS numeric(2)asbegin DECLARE @percent varchar(255) if datediff(Day,current_timestamp, DATEADD(Year, 2, @joindt)) <= 0 Begin set @percent = 15.00000000 END ELSE BEGIN if @salary <= 5000 begin set @percent = 13.00000000 end else begin set @percent = 12.00000000 end END RETURN @percentEND |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2013-03-28 : 02:54:54
|
Make sure when calling it that you're passing both @joindt and @salary |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2013-03-28 : 04:39:51
|
quote: i got the error :Kindly assist.An insufficient number of arguments were supplied for the procedure or function dbo.findEmployerPercentage
Show us your queryAlso why are you declaring @percent as varchar ? when you are storing numeric into it ? KH[spoiler]Time is always against us[/spoiler] |
|
|
abdbari
Starting Member
7 Posts |
Posted - 2013-03-28 : 05:00:08
|
OK now.tq |
|
|
|
|
|