|
我有一个例子,关于筛选!
ALTER PROCEDURE dbo.[FMaterialInOutRecord Date]
(@begin datetime,
@end datetime)
AS SELECT MInVoucherNo AS Voucher, [MInDate] AS [Date], MaterialCode, MaterialName, MaterialDesc, MaterialSize, MInQuantity AS Quantity, UNITS,
SupplierName AS TITLE,[INTO] AS [STATUS]
FROM FMaterialInRecord
WHERE (dbo.FMaterialInRecord.MInDate BETWEEN @begin AND @end)
UNION ALL
SELECT MOutVoucherNo AS Voucher, [MOutDate] AS [Date], MaterialCode, MaterialName, MaterialDesc, MaterialSize, MOutQuantity AS Quantity, UNITS,
WORKSHEET AS TITLE,[OUT] AS [STATUS]
FROM FMaterialOutRecord
WHERE (dbo.FMaterialOutRecord.MOutDate BETWEEN @begin AND @end)
|
|