Pretty new to Teradata and I've been stuck on this error for a little bit.
Trying to fill an empty table with data from a differenet table. Everything is the exact same between the tables, except for the partition.
I forgot that the primary index was also changed.
Everything is the exact same between the tables
The order of columns is different and you're doing a "SELECT *".
Simply switch to the correct column list:
INSERT INTO Measurement_Fact_1
Sensor_Id, Timestamp_ID, Measure_Date, Geo_Point_ID, Well_ID,
Measure_Type_ID, Source_ID, Measure_Value, Load_Ts
Btw, you should extend the RANGE_N far into the future to avoid any need to modify it again as empty partitions have zero overhead, e.g.
PARTITION BY RANGE_N(Measure_Date BETWEEN DATE '2006-01-01' AND '2030-12-31' EACH INTERVAL '1' DAY, NO RANGE, UNKNOWN);
Similar instead of DROPing old partitions simply DELETE the data in it.
Thank you! Not sure how I couldn't figure it out, but sometimes you just need a second set of eyes on it. Good point on extending the range.
dNoeth, I've been using Teradata for about 8 months and have been reading your answers to questions since probably Day 1. Much of what I read is years old but your answers are still relevant to my problems. Thanks for taking the time to write clear, concise answers. I also appreciate the fact that you're not rude to people just getting started who sometimes make what to an experienced person are silly mistakes.