|
如以下查詢:
INSERT INTO Regie_Total ( Bill, Barcode_Datas, OutBox, Style, Color_no, 0, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, S, M, L, Rebate )
SELECT Total_Data.Bill, Total_Data.Barcode_Datas, Total_Data.OutBox, Total_Data.Style, Total_Data.Color_no, Total_Data.[00], F([TOTAL_DATA].[50]) AS 50, F([TOTAL_DATA].[60]) AS 60, Total_Data.[70], Total_Data.[80], Total_Data.[90], Total_Data.[100], Total_Data.[110], Total_Data.[120], Total_Data.[130], Total_Data.[140], Total_Data.[150], Total_Data.S, Total_Data.M, Total_Data.L, Total_Data.Rebate
FROM (Total_Data INNER JOIN Regie_Bill ON Total_Data.Bill = Regie_Bill.Bill) LEFT JOIN Regie_Total ON Total_Data.Bill = Regie_Total.Bill
WHERE (((Regie_Bill.Bill) Not In ([REGIE_TOTAL].[BILL])));
Function F(DATA1 As Variant)
If IsNumeric(DATA1) = False Then
F = DATA1
Else
F = IIf(DATA1 < 0, -DATA1, DATA1)
End If
End Function
|
|