Create PROCEDURE [dbo].[JiuChanPinLiuTongJiLuProcess]
(
@JiuChanPinId decimal(18,0)
)
AS
select * from (
select top 100 Percent UpdateDate 日期,'从'+ShouHuoName +'到'+ GouHuoName as 流通方式
from VWJiuChanPinLiuTongJiLu where BCLiuTongLeiXingId=1 andJiuChanPinId=@JiuChanPinId order by UpdateDate)m
union all
select * from (
select top 100 Percent UpdateDate 日期,'从'+ShouHuoName+'到' + GouHuoName as 流通方式 from VWJiuChanPinLiuTongJiLu where BCLiuTongLeiXingId=2 andJiuChanPinId=@JiuChanPinId order by UpdateDate)n
go