从品牌网站建设到网络营销策划,从策略到执行的一站式服务
use TEST
go
create PROCEDURE [dbo].[SP_物料出入库周期]
(
@起始日期 VARCHAR(8),
@结束日期 VARCHAR(8)
@id char(3) output
)
AS
BEGIN
SET NOCOUNT ON; --当 SET NOCOUNT 为 ON 时,不返回计数。当 SET NOCOUNT 为 OFF 时,返回计数。
----------------删除临时表------------------------------------
--if object_id('tempdb..#TempA') is not null drop table #TempA;
--------------------------------------------------------------
select
INVMC.MC001 as '品号'
,MB002 as '品名'
,INVMC.MC002 as '仓库'
,CMSMC.MC002 as '仓库名称'
,INVMC.MC007 as '库存数量'
,INVMC.MC011 as '上次盘点日'
,INVMC.MC012 as '最近入库日'
,INVMC.MC013 as '最近出库日'
from INVMC ,INVMB ,CMSMC
where
INVMC.MC001 = MB001 and INVMC.MC002 = CMSMC.MC001
and ((INVMC.MC012 BETWEEN @起始日期 AND @结束日期 ) or (INVMC.MC013 BETWEEN @起始日期 AND @结束日期 ))
and INVMC.MC002 in ('101','102','103','104','106','110')
---------------------------------------------------------------
End
---------------------------------------------------------------
declare @id char(3)
exec TEST..SP_ASCII 90,90,57,@d = @id output
select @id as 序号
成都网站建设公司地址:成都市青羊区太升南路288号锦天国际A座10层 建设咨询028-86922220
成都快上网科技有限公司-四川网站建设设计公司 | 蜀ICP备19037934号 Copyright 2020,ALL Rights Reserved cdkjz.cn | 成都网站建设 | © Copyright 2020版权所有.
专家团队为您提供成都网站建设,成都网站设计,成都品牌网站设计,成都营销型网站制作等服务,成都建网站就找快上网! | 成都网站建设哪家好? | 网站建设地图