Oct 11 2020 12:55 AM
I've successfully merged tables and data integrity has remain stable until my last query merge step. In some instances it has duplicated or tripled the line data and I don't know why. Does someone know why?
ie: SKU: aaa-aa-aa-nn 15000
table merging contains sku, sku classification, sku status
My goal is to import the sku classification and sku status but when I merge the table it's repeating the lines. I've been able to determine one specific sku but don't know why it is happening when my other merges have been successful. Any assistance would be appreciated.
Oct 11 2020 01:10 AM
@CathyPulido Difficult to diagnose without seeing the data (both tables) and the steps applied.
Oct 12 2023 01:02 PM - edited Oct 13 2023 05:09 AM
I will try my best to explain my situation in a few words and I will attach an archive with some files (I have anonymized the real data for security reasons).
I need to prepare a report that will allow me to see the billing for a contact center with multiple clients.
I`m struggling to get the report finished because I get duplicate rows after merging two appended queries.
I have tried in two ways:
Thank you!
Oct 12 2023 10:43 PM
Solution@adrianmihaita Your query merges the two other based on License ID alone. Since you have 13 periods (Year-Month) for each license, PQ will create 13 X 13 = 169 rows for each one. You need to base the merge (LeftOuter) on Licence ID, Year and Month.
First select License ID in both left and right, then press and hold Ctrl and select Year in both and then Month in both. LeftOuter and OK. Expand the relevant columns from the merged tables and you get the billing report, one row for each license, year and month. Thus, 13 rows for each license.
Oct 13 2023 12:32 AM
@Riny_van_Eekelen thank you for point out the obvious fact ... now it makes sense! :)
Thank you very much for your prompt and fast reply
Oct 12 2023 10:43 PM
Solution@adrianmihaita Your query merges the two other based on License ID alone. Since you have 13 periods (Year-Month) for each license, PQ will create 13 X 13 = 169 rows for each one. You need to base the merge (LeftOuter) on Licence ID, Year and Month.
First select License ID in both left and right, then press and hold Ctrl and select Year in both and then Month in both. LeftOuter and OK. Expand the relevant columns from the merged tables and you get the billing report, one row for each license, year and month. Thus, 13 rows for each license.