sql server - Display data with stored procedure -


i have following stored procedure..

create procedure usp_com_mst_del(     @code int = 0,     @name varchar(50)= '',     @type int =0,     @operation varchar(20) ='',     @message varchar(200) output,     @status varchar(2) output ) begin     if(@operation = 'display')     begin         if not exists (select * com_mst com_ctcd = @type)         begin             set @status = '0'             set @message = 'no record found'         end         else         begin              set @status = '0'             set @message = 'no record found'             select * com_mst com_ctcd = @type         end     end end 

but when try run procedure.. shows error

usp_com_mst_del @operation = 'display' 

error:

procedure or function 'usp_com_mst_del' expects parameter '@message', not supplied.

you need specify output parameters should go to.

declare      @message varchar(200),     @status varchar(2)   exec usp_com_mst_del @operation = 'display', @message output, @status output 

(which error message saying)


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -