AS declare @times varchar(20) declare @sms varchar(20) select @times=(convert(varchar(12),getdate(),108) )
if @times between '22:00:00' and '23:00:59' begin set @sms='你好' return @sms end
else begin set @sms='我好' return @sms end GO
------------------------
CREATE PROCEDURE proc_two
AS declare @content varchar(20) exec proc_time 我要把@content和proc_one中返回的@sms叠加怎么写 GO
------解决方案-------------------- 第一个要改一下吧,如下
SQL code
CREATE PROCEDURE proc_one @sms varchar(20) OUTPUT
AS
declare @times varchar(20)
select @times=(convert(varchar(12),getdate(),108) )
if @times between '22:00:00' and '23:00:59'
begin
set @sms='你好'
end
else
begin
set @sms='我好'
end
------解决方案--------------------