sql query help

Discussion in 'MySQL' started by AndyFarrell, Feb 2, 2008.

  1. #1
    hey everyone.
    i have 2 tables, one with car makes/models and the another with reviews for the makes and models.

    i am trying to join both tables but i keep getting duplicates.
    this is my code.
    
    select e.[Model Year],e.[Division Name],e.[Model ID],e.[Model Name],e.[Model Strengths],e.[Model Changes],e.[Model Value],e.[Model Overview],m.[VIF],m.[StyleID]
    	  from NSReviews e full outer join NSmakes m 
    	    on (e.[Division Name] = m.eMake and  m.eModel = e.[Model Name])  
    
    Code (markup):
    the only Related rows are the makes & models
    thanks.
     
    AndyFarrell, Feb 2, 2008 IP
  2. mnn888

    mnn888 Member

    Messages:
    92
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #2
    is the [Division Name] suppose to be join with m.eMake?
    e.[Division Name] = m.eMake doesn't seem right
     
    mnn888, Feb 2, 2008 IP
  3. AndyFarrell

    AndyFarrell Peon

    Messages:
    89
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yes [Division Name] is the name of the make column in one of the table
     
    AndyFarrell, Feb 3, 2008 IP