Forum Discussion

christianNavarr's avatar
christianNavarr
New Member
2 years ago
Solved

How to combine these tables?

Hi, every body!

I need to combine these two tables, One is called "Horometros" and another "Mantenimiento". In the table Horometros i have a compilation of the work hours of the machines, in the Mantenimeinto table i have all the failures presented in the maquinary. I have to combinate these tables to calculate the KPI´s. My problem is, when i combine the tables, the values of working hours are duplicated in response to the mantenimiento extra rows and the amount of hours is too hi than the real, i nedd use the columns date, equipment and shift work to do a condition. Can anyone helpme with this please.

 

 

 

 

  • christianNavarr hi,

     

    Make sure the columns you are using to merge are unique. If any of your columns have duplicate values it will create duplicates. Check these three column by using group by. You will know if any of the column has duplicate values. 

     

     

    Did I help? If yes, hit 👍 and accept my solution as answer. 

     

     

1 Reply

  • rubayatyasmin's avatar
    rubayatyasmin
    Icon for Community Champion rankCommunity Champion

    christianNavarr hi,

     

    Make sure the columns you are using to merge are unique. If any of your columns have duplicate values it will create duplicates. Check these three column by using group by. You will know if any of the column has duplicate values. 

     

     

    Did I help? If yes, hit 👍 and accept my solution as answer.