locked
join 2 tables with 2 criteria RRS feed

  • Question

  • hello

    i'm trying to join 2 tables with 2 criteria

    one criteria is  "numero de matricule" and the other is "date" 

    in one table i have many times the same "matricule"  it depends of "date de validité" validity date


    ex table 1

    n°mat - periode - montant

    1 -31-12-2013 -  100

    table2

    n°mat -periode - nom - adresse

    1 - 31-12-2013 - gerard  - 12 RUE X

    1- 31/12/2012-GERARD - 2AVENUE Z

    how can i join those tow table

    thak you for your help, i'm a french beginner


    Thursday, June 5, 2014 9:24 AM

Answers

  • select *
    
    from table1 as a
    
    join table2 as b
    
    on a.n°mat = b.n°mat 
    
    and a.periode = b.periode



    sqldevelop.wordpress.com

    Thursday, June 5, 2014 9:29 AM
    Answerer

All replies