While I am using update command i am getting this error. Please can you help on this??
Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 1227 StartFragment: 314 EndFragment: 1195 StartSelection: 314 EndSelection: 314SyntaxEditor Code Snippet
SET PROFITFORSALE = NULL where YEARID=201709
This doesn't look like a Teradata dbms error. This looks more like an application error. Have you tried the forum (if one exists) for that application?
What application are you using to execute the update command?
And in SQL Assistant you're getting the folowing error message: "Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 1227 StartFragment: 314 EndFragment: 1195 StartSelection: 314 EndSelection: 314" ?
No, you can't update using a ROW_NUMBER, why would you do that, just to avoid the Duplcate Row error?
You should investigate why you get duplicate rows, there should be a logical Primary Key in your table and a column named PROFITFORSALE can't be a part of it. So you got bad data and should fix it (and check your load process to avoid it in future).
- a fact table is usually big and thus created as MULTISET (you currently get the error because it's SET, doing Duplicate Row check), of course only if the load process isn't faulty
- for me 201709 is not a YEARID, but YEARMONTH or MONTHID
- why do you update all rows for this month to NULL? When it will be set to a value in following step there's no need to update twice.
-its fact column .we have duplicates and data is like that.
-and 201709 is month id as u said .its typo from my side.
-i am inserting data into that column , i mean updating that column with other column values .before that operation i need to make all values null.
so thinking to update by row number ()