Archives of the TeradataForum
Message Posted: Tue, 29 Jul 2008 @ 10:41:59 GMT
I am trying to update a table (Table1) using a join on the PI. I have created a temp table (Table2) with the same PI, using data from the original table.
UPDATE t1 FROM Table1 t1, Table2 t2 SET t1.consumer_count = t2.consumer_count WHERE T1.table1_id = t2.table1_id;
Table1 has about 70k rows.
Table2 has about 64k rows.
Every record in Table2 has a corresponding table1_id in table1, and the id is unique on both tables.
All data types match, and column stats on both PIs are current.
I expect the update statement to update 64k rows, but it only updates 2,910 rows.
I have also tried making a copy of table1 (table1_alt) in case there was a row locking issue, but got the same result when I tried to update the alternate table.
Does anyone know what could be causing this, or how I can update the expected number of rows?
|Copyright 2016 - All Rights Reserved|
|Last Modified: 23 Jun 2019|