MySQL Forums
Forum List  »  Newbie

Help with a Join command
Posted by: charles whitehead
Date: August 27, 2016 07:12PM

I am a beginner using my SQL. I was hoping someone could help me with this Query
I have two tables Final and Users. Final has the Comlumns idfinal,Projectname,manger,dspmanger.
The Table User has the columns idname,firstname,lastname,fullname.

Table Final

IDfinal | Projectname | manger | dspmanger |
1 | test | 1 | 2 |

Table user

Idname | Firstname | Lastname | Fullname |
1 | User A firstname | User A lastname | User A Fullname |
2 | User B firstname | User B lastname | User B Fullname |

I would like to have final table that will end up looking like below

Project Number| Project Nameame | Project_manger | Developer |
1 | Test | User A Fullname| User B fullname |


Currently I have been trying to do this with a Join, but I have not had any luck with getting the dspmanger info
to show properly.


Select
test.final.idfinal AS 'Project Number',
test.final.Projectname AS 'Project Name',
test.user.Fullname AS 'Project Manger'
From
test.final
Join
test.user on final.Manger = user.idname;

Options: ReplyQuote


Subject
Written By
Posted
Help with a Join command
August 27, 2016 07:12PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.