Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i have the following issue. I hope you can guide me to the correct method for solving this issue.
I have the following table:
As you can see, the first row is duplicated except the value in "Standard Price New".
My question is, is there a way to merge the duplicated rows ad keep the one with values, i.e 5000 in this case? There are 4 columns called "Standard Price ...." and the values can appear in any 4 of them, including all.
NOTE: The same could happen for any row so its not like the position is fixed for the duplicated row.
Please let me know if you require more information.
Resulting Table will only have the row with the value in the "standard Price ..." columns. So, is the picture above, the first row will disappear and the second row will take it's place.
Some background information as to how the second row is generated:
The second row is generated through a different script and then concatenated/joined to this table. which is why there are two rows with the same values. The original table does not have any duplicates.
Thank you.
Try something like this.
Load
Dim1,
Dim2,
DimN
Max(Standardprice1) as Standardprice1,
Max(Standardprice2) as Standardprice2,
Max(Standardprice3) as Standardprice3
From TableSource
Group by Dim1, Dim2,DimN;
Try something like this.
Load
Dim1,
Dim2,
DimN
Max(Standardprice1) as Standardprice1,
Max(Standardprice2) as Standardprice2,
Max(Standardprice3) as Standardprice3
From TableSource
Group by Dim1, Dim2,DimN;