1:
2:
3:
|
SELECT DISTINCTROW "Medical" AS Category, "" AS CIP, qTotals_SM.Requisition, qTotals_SM.PONumber, qTotals_SM.Vendor, qTotals_SM.Address, qTotals_SM.Contact, qTotals_SM.Phone, qTotals_SM.Extension, "" AS gry, qTotals_SM.Equip AS ItemCode, qTotals_SM.Item, qTotals_SM.Name AS Description, qTotals_SM.Manuf, qTotals_SM.Model_no, qTotals_SM.Dimensions, qTotals_SM.Electrical, qTotals_SM.Emer_power, qTotals_SM.Plumbing, qTotals_SM.Mechanical, qTotals_SM.Standard AS [Spec Approval], qTotals_SM.DateApproved AS [Approval Date], qTotals_SM.ApprovedBy AS [Approved By], [Furnish] & "F" & [Install] & "I" AS Resp, "" AS gry2, Sum(qTotals_SM.totqty) AS [QTY Total], Sum(qTotals_SM.Ex_Quantity) AS [QTY Exist], Sum(qTotals_SM.newqty) AS [QTY New], qTotals_SM.ListPrice AS [Budget Unit Cost], qTotals_SM.ReqQuotePrice, Sum(Format([TotCOST1],"Currency")) AS [Budget Total], qTotals_SM.UnitCost AS [Actual Unit Cost], Sum(Format([TotCOST],"Currency")) AS [Actual Total], Format([TotCOST]-[TotCOST1],"Currency") AS [Variance Total], "" AS gry3, "" AS [Receiving Number], "" AS [Receive 1], "" AS [Receive 2], "" AS [Receive 3], "" AS [Receive 4], "" AS [Order Complete], "" AS [Owner Acceptance], "" AS Comments
FROM qTotals_SM
GROUP BY "Medical", "", qTotals_SM.Requisition, qTotals_SM.PONumber, qTotals_SM.Vendor, qTotals_SM.Address, qTotals_SM.Contact, qTotals_SM.Phone, qTotals_SM.Extension, "", qTotals_SM.Equip, qTotals_SM.Item, qTotals_SM.Name, qTotals_SM.Manuf, qTotals_SM.Model_no, qTotals_SM.Dimensions, qTotals_SM.Electrical, qTotals_SM.Emer_power, qTotals_SM.Plumbing, qTotals_SM.Mechanical, qTotals_SM.Standard, qTotals_SM.DateApproved, qTotals_SM.ApprovedBy, [Furnish] & "F" & [Install] & "I", "", qTotals_SM.ListPrice, qTotals_SM.ReqQuotePrice, qTotals_SM.UnitCost, Format([TotCOST]-[TotCOST1],"Currency"), "", "", "", "", "", "", "", "", "";
|