Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

reasons for duplicate rows

Hi, why are there duplicate rows? I concatenated tables from different sources and 'itemnum' is primary key. The itemnum appears in all the tables and has data for all columns but still duplicates, for example, it has data for all the columns from one table but is null for the other columns in other tables. So there is duplicate like below:

itemnumsitenamebalanceclasscodeGroup
1009AD-B--
1009--45-FGH

How can I combine everything to one row (distinct itemnum)?

itemnumsitenamebalanceclasscodeGroup
1009AD45BFGH

Thanks.

24 Replies
anbu1984
Master III
Master III

Try join instead of concatenation

Anonymous
Not applicable
Author

can you pls share the datamodel picture?

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You will need to join rather than concatenate to get them on the same row. Post more details of your data and script for more detailed help on how to do so.

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Oh yes, sorry I meant join. I used 'outer join'.

Not applicable
Author

I have used 'outer join'.

Not applicable
Author

Is there any other way for you to help me? Because I can't post the data...so sorry.

Not applicable
Author

Sorry, what is datamodel picture?

manojkulkarni
Partner - Specialist II
Partner - Specialist II

concatenate will always add separate row, but join on primary key can help you to remove duplicate

jonathandienst
Partner - Champion III
Partner - Champion III

There is something wrong with your join. To get help, you will need to post your load script and some more details of your data. Best solution is to upload your model here.

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein