×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

inner join in mysql

inner join in mysql

inner join in mysql

(OP)
I have pasted this statement in from access - it works fine in access but not in mysql - there seems to be an error with the join statement - is the syntax diffetent in some way in mysql - or is there a similar graphic tool to access that you can use with mysql - any help would be appreciated

SELECT tblproject.id, tblproject.jobno, tblproject.proOp, tblproject.client, tblClients.Coname, tblproject.Projname, tblproject.BusCat, tblbusiness.buscatgy, tblproject.ProOpdate, tblemployee.empid, tblemployee.fname, tblproject.Projdes, tblproject.Val, tblproject.Startdt, tblproject.Enddt, tblproject.Prob, tblproject.Active, tblemployee.sname, tblproject.archive
FROM (tblbusiness INNER JOIN (tblClients INNER JOIN tblproject ON tblClients.Coid = tblproject.client) ON tblbusiness.catid = tblproject.BusCat) INNER JOIN tblemployee ON tblproject.empid = tblemployee.empid;

thanks

RE: inner join in mysql

Hi tonec,

As a matter of fact I have been working recently on an Access to MySQL conversion and the INNER JOINS have also been bugging me. Anyway I have the solution for you below although I haven't fully tested it.

If you notice each INNER JOIN is dealt with one at a time and in a consistent "JOIN Link" each time. When the first INNER JOIN is done i.e. 'tblClients.Coid = tblproject.client' - it then proceeds to move to the next one 'tblbusiness.catid = tblproject.BusCat' but making sure that one of the tables being joined was the same as the last join (kinda like following the joins one from another). Anywayz, I hope this makes sense as I have spent hrs trying to get my head around it...

SELECT tblproject.id, tblproject.jobno, tblproject.proOp, tblproject.client, tblClients.Coname, tblproject.Projname, tblproject.BusCat, tblbusiness.buscatgy, tblproject.ProOpdate, tblemployee.empid, tblemployee.fname, tblproject.Projdes, tblproject.Val, tblproject.Startdt, tblproject.Enddt, tblproject.Prob, tblproject.Active, tblemployee.sname, tblproject.archive
FROM (((tblClients INNER JOIN tblproject ON tblClients.Coid = tblproject.client) INNER JOIN tblproject ON tblbusiness.catid = tblproject.BusCat) INNER JOIN tblemployee ON tblproject.empid = tblemployee.empid);

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close