Issue with parameters

  • Hello,

    I have a function where I am passing 4 parameters

    FUNCTION [dbo].[Employee]

    (@ID varchar(120),

    @SCR nvarchar(3000),

    @Hw1 varchar(10),

    @HW2 varchar(10) = '%'

    )

    I am calling this function in another stored procedure when I called this

    select * from [dbo].[Employee](@ID,@SCR,'*')

    I am getting this error An insufficient number of arguments were supplied for the procedure or function Even after compiling the function.

  • This is to be expected. Functions require every parameter to be passed, regardless of if you're going to use them all.

    Try:

    SELECT * FROM dbo.Employee(@ID, @SCR, '*', DEFAULT);

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply