How can I tie the update table to a table in the subselect to ensure the update takes place on the correct rows. Example:
Update RDS_RFID_DATA
Set task_nbr =
(Select c.task_nbr
from RDS_RFID_DATA a, RDS_BLDG_AREA b,
INV_TASK c
Where a.loc_nbr = b.loc_nbr
And a.bin(1:3) = b.whse_aisle
And...
Thanks for the replys.
I have tow(2) sets of data on the same database table. I want to update one of the two with the other if the keys match between the two (exception on the key is the sell_divn_nbr).
THE FOLLOWING SQL GETS A ERROR ON THE "FROM" VERB, WHY?
UPDATE BIZ.RDS_SALES_DTL SD1
SET RSRV_UNITS= SD1.RSRV_UNITS+SD2.RSRV_UNITS),
SALE_UNITS=(SD1.SALE_UNITS+SD2.SALE_UNITS),
SALE_DLRS=(SD1.SALE_DLRS+SD2.SALE_DLRS)...
I need to construct a SQL statement, against one table that has multiple versions of the same data, that would indicate if the summed quantity of the previous file quantity was different from the current file quantity.
Each row was PO# and STYLE# and QTY# and PHASE#
Example:
PO1, STYLE1, QTY1...
Let me give a little more information:
The SQL is:
Select distinct px.may_po_nbr From may_to_fed_po px
group by px.may_po_nbr, px.loc_nbr having count(*) > 1
This return PO numbers 165571 and 195597. I did not expect that. I would think neither of the PO numbers would be returned.
Data...
I want to update rows in a table that have foe than one location associated with it but does not include certain locations. I have tried the following:
group by may_po_nbr, loc_nbr
having rowcount_big() > 1
and rowcount_big() > 1
group by may_po_nbr, loc_nbr
Both bring back even those with...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.