UPDATE Query
From: Darren Line (darren_at_ganedatascan.com)
Date: 04/14/04
- Next message: Rhonda Fischer: "Re: => Query to copy tbl1 split entries into tbl2"
- Previous message: Graham Feeley: "Re: Summary Question in a Query"
- Next in thread: Jeff Boyce: "Re: UPDATE Query"
- Reply: Jeff Boyce: "Re: UPDATE Query"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 14 Apr 2004 09:55:24 +0100
Hi, I was wondering if you could help me with this query.
I have created the following query...
SELECT Sum(SalesDetailActual.QtyAlloc) AS SumOfQtyAlloc,
SalesDetailActual.ProdRecNo
FROM SalesDetailActual INNER JOIN SalesOrderH ON SalesDetailActual.SoRecNo =
SalesOrderH.SoRecNo
WHERE (((SalesOrderH.SoStatus)<>2) AND ((SalesOrderH.SoType)="S"))
GROUP BY SalesDetailActual.Product
HAVING (((Sum(SalesDetailActual.QtyAlloc))<>0));
The result is just a list of product record numbers and a value next to it.
I would like to use these values to update a field in another table.
The field I would like to update is called "Alloc" in the table "Products"
(ProdRecNo is the key in Products table and also in the query above).
I am just unsure if its possible to actually do this in one command, or I
have to write some vbscript to loop around the query and then do individual
updates per prodrecno.
Any assistance would be much appreciated.
TIA
Darren.
- Next message: Rhonda Fischer: "Re: => Query to copy tbl1 split entries into tbl2"
- Previous message: Graham Feeley: "Re: Summary Question in a Query"
- Next in thread: Jeff Boyce: "Re: UPDATE Query"
- Reply: Jeff Boyce: "Re: UPDATE Query"
- Messages sorted by: [ date ] [ thread ]