USE [JIN]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER procedure [dbo].[str_order]
@subitem_name nvarchar(50),
@item_descript nvarchar(100),
@item_rate decimal(18,2)
as
begin
declare @entrydate date
set @entrydate=GETDATE()
declare @time time
set @time= CURRENT_TIMESTAMP
declare @order_id nvarchar(50)
set @order_id=@subitem_name+convert (nvarchar(50),DAY(getdate()))
insert into Jin_order(subitem_name,item_descript,item_rate,entrydate,time,order_id)values(@subitem_name,@item_descript,@item_rate,@entrydate,@time,@order_id)
end
Try above stored procedure in your SQL server.
then execute below statement.
exec str_order 'asdd','test',10.2