1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[SQL] Join 2 tables, many to many, but show unique elements from both tables

Discussão em 'Outras Linguagens' iniciado por Stack, Outubro 9, 2024 às 23:42.

  1. Stack

    Stack Membro Participativo

    I hope I can explain the result I want to achieve. I have wo tables, and I want to join 2 tables, but the union of both shows me unique results. I don't know if the relationship is wrong and there is a better way to edit these tables on the server.

    Example:

    Table A:

    IdUser IdProject IdTool Status
    1 a 1 yes
    1 a 15 yes
    1 a 31 no

    Table B:

    IdUser IdProject IdTool IdEval Status
    1 a 31 1 no
    1 a 31 2 no
    1 a 31 3 yes

    I have tried to get this result but it has been very complicated for me

    Table RESULT

    IdUser IdProject IdTool IdEval StatusA StatusB
    1 a 1 null yes null
    1 a 15 null yes null
    1 a 31 null no null
    1 a 31 1 null no
    1 a 31 2 null no
    1 a 31 3 null yes

    I hope you can help me and I thank you from the bottom of my heart in advance.

    Continue reading...

Compartilhe esta Página