1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- -- ================================================
- -- Template generated from Template Explorer using:
- -- Create Procedure (New Menu).SQL
- --
- -- Use the Specify Values for Template Parameters
- -- command (Ctrl-Shift-M) to fill in the parameter
- -- values below.
- --
- -- This block of comments will not be included in
- -- the definition of the procedure.
- -- ================================================
- SET ANSI_NULLS ON
- GO
- SET QUOTED_IDENTIFIER ON
- GO
- -- =============================================
- -- Author: ²Ü¼Î½Ü
- -- Create date: 2022/8/11
- -- Description: ·Ö°ü²éѯ
- -- =============================================
- IF (EXISTS (SELECT * FROM SYS.OBJECTS WHERE NAME = 'SP_Cust_PDA_GetBarCodeState'))
- DROP PROC SP_Cust_PDA_GetBarCodeState
- GO
- CREATE PROCEDURE SP_Cust_PDA_GetBarCodeState
- -- Add the parameters for the stored procedure here
- @BarCode NVARCHAR(500),
- @OrgCode NVARCHAR(50)
- AS
- BEGIN
- -- SET NOCOUNT ON added to prevent extra result sets from
- -- interfering with SELECT statements.
- SET NOCOUNT ON;
- -- Insert statements for procedure here
- DECLARE @OrgID AS BIGINT
- SELECT @OrgID = ID FROM Base_Organization WHERE Code = @OrgCode
- SELECT Code, State, WhQty, BarCodeType, Qty
- FROM BC_BarCode
- WHERE Code = @BarCode
- -- AND Org = @OrgID
- AND BarCodeType = 3
- END
- GO
- -- EXEC SP_Cust_PDA_GetBarCodeState @BarCode = '000168GDCL-22050000', @OrgCode = '168'
|