USE [ShimadaWebOrder ]
GO
/****** Object: StoredProcedure [dbo].[sp_orderState_handl] Script Date: 05/16/2012 14:35:27 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
ALTER proc [dbo].[sp_orderState_handl]
(
@RefNo varchar(500), --订单号
@CustID varchar(50) --登录编号
)
as
begin
declare @CmdText varchar(8000)
declare @CustIDValues varchar(50)
set @CustIDValues=@CustID
set @CmdText=N'
update [O_OrderMaster] set [Status]=''C'',
[OrderConfirmDate]=getdate(),[OrderConfirmBy]='''+@CustIDValues+''' where [RefNo] in ('+@RefNo+')' -- 红色标记是容易出错的地方
exec(@CmdText)
print @CmdText
end