您好,登錄后才能下訂單哦!
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 序號
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。