Stuart McLachlan
stuart at lexacorp.com.pg
Mon Mar 24 16:52:41 CST 2003
> I have a OrderHeader and OrderDetails tables. > The OrderHeader contains a InvoiceType field, set to True for Invoice > and False for CreditNotes. In other words Invoice Header = -1 for Invoice and 0 for CreditNotes > The OrderDetails contains a Quantity field. This is always a positive > value, even for CreditNotes. > The join between the tables is on OrderID. > > What I am trying to do is create a query that will return a single value > for all the quantities on order in the OrderDetails, for a given product > number. So where the InvoiceType = False, the Quantity will have to be > Quantity * -1. > - (Quantity * InvoiceType) -- Lexacorp Ltd http://www.lexacorp.com.pg Information Technology Consultancy, Software Development,System Support.