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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 An insufficient number of arguments were supplied

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.findEmployerPercentage


The script as below:
alter function findEmployerPercentage(@joindt datetime, @salary numeric)
RETURNS numeric(2)
as
begin
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 @percent
END

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
Go to Top of Page

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 query

Also why are you declaring @percent as varchar ? when you are storing numeric into it ?


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

abdbari
Starting Member

7 Posts

Posted - 2013-03-28 : 05:00:08
OK now.tq
Go to Top of Page
   

- Advertisement -