I have a table called branch (branchid, branchname) and another table called transfer transfer(tranferid, sourcebranch, destinationbranch)
both sourcebranch and destinationbranch are Fk to the branchid of of branch table. I need to show a query that looks like this
Tranferid Source Destination 4 uk us
but all I can get is something like this
Tranferid Source Destinationid 4 uk 3
query sample
select tranferid, branch.branchname, transfer.destinationbranch from transfer inner join branch on branch.branchid == transfer.sourcebranch
How do I get the destination branch to show. CTE on my mind