Click here to Skip to main content
15,503,491 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I get a datagridview with datatables on its own rows with this query


C#
SELECT 
    E.*,
    TA.Numero_Transfert,
    Ta.Code_Transfert,
    TA.Numero_Agent,
    TA.Montant_Transfert,
    D.* 
FROM 
    Expéditeur E 
FULL JOIN 
    Transfert_Argent TA ON (E.Cin_Expéditeur = TA.CIN_Expéditeur) 
FULL JOIN 
    Agent A ON (A.Numero_Agent = TA.Numero_Agent)
FULL JOIN 
    Destinataire D ON (D.Cin_Destinataire = TA.Cin_Destinataire);


What I have tried:

i tried to change the JOIN with(Inner Join) Or (Left Join)..... without any results
Posted
Updated 7-Nov-21 10:19am

1 solution

Because that is what a FULL JOIN does - it shows all the rows from all the tables involved: SQL - FULL JOINS[^]

I don't know what data you have, or what results you expect - so I can't tell you what to write to get them. But ... a FULL JOIN is probably not what you want. Start here: SQL JOINS diagram[^] and thing about your inputs and outputs. Then work out exactly what you want to achieve along with the diagrams and double check here before moving to code: SQL Joins[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900