--查詢 BARCODE --
DECLARE @SN VARCHAR(22) SET @SN='FT5514A0100197I01577X2'
SELECT *
FROM MGMES.DBO.G_SN_STATUS
WHERE SERIAL_NUMBER=@SN
SELECT *
FROM MGMES.DBO.G_SN_TRAVEL
WHERE SERIAL_NUMBER=@SN
;
--Input Barcode Find Tray --
DECLARE @SHIT VARCHAR(22);
DECLARE @SN VARCHAR(22) ;
SET @SN='ft5546t03c2197n0121002'
SELECT *
FROM MGMES.DBO.G_SN_TRAVEL
WHERE SERIAL_NUMBER=@SN;
SELECT @SHIT=TRAY_BASE_ID
FROM G_TRAY_STATUS
WHERE SERIAL_NUMBER=@SN;
--
SELECT *
FROM MGMES.DBO.G_TRAY_BASE
WHERE TRAY_BASE_ID=@SHIT;
沒有留言:
張貼留言