Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Create a stored procedure

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Use TESTgocreate PROCEDURE [dbo]. [SP_ material entry and exit cycle] (@ start date VARCHAR (8), @ end date VARCHAR (8) @ id char (3) output) ASBEGIN SET NOCOUNT ON;-when SET NOCOUNT is ON, no count is returned. Returns a count when SET NOCOUNT is OFF. -Delete temporary tables-- if object_id ('tempdb..#TempA') is not null drop table # TempA -select INVMC.MC001 as' item number', MB002 as' item name', INVMC.MC002 as' Warehouse', CMSMC.MC002 as' Warehouse name', INVMC.MC007 as' inventory quantity', INVMC.MC011 as' Last inventory date' INVMC.MC012 as' recent entry date', INVMC.MC013 as' recent exit date 'from INVMC, INVMB, CMSMC where INVMC.MC001 = CMSMC.MC001 and ((INVMC.MC012 BETWEEN @ start date AND @ end date) or (INVMC.MC013 BETWEEN @ start date AND @ end date) and INVMC.MC002 in (' 101', '102',' 103, '104',' 106' '110')-End -declare @ id char (3) exec TEST..SP_ASCII 90pi 90jie 57 @ d = @ id outputselect @ id as serial number

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report