Could you post us the table tmp10110191 structure!
If tmp10110191 table has site_no column, SQL below will do
UPDATE tmp10110191 t
SET t.mnth_sales_amt =
(SELECT SUM (dlycsh.sales_amt)
FROM tmx.dlycsh, chgdata.tmp10110191
WHERE dlycsh.tran_dt >= TO_DATE ('01/01/03', 'MM/DD/YY')
AND dlycsh.tran_dt <= TO_DATE ('10/22/03', 'MM/DD/YY')
AND dlycsh.site_no = t.site_no)
Regards,
Main Topics
Browse All Topics





by: HenkaPosted on 2003-10-26 at 22:11:54ID: 9625117
I think that there are more dlycsh.site_no (GROUP BY dlycsh.site_no) than one there.