SQL merge 3 historic table

  • Hi all,

    i have 3 tables,and i wanna merge them looking at sdatekey and edatekey.

    Table1

    sdatekey edatekey title ID

    10 15 x 12

    Table2

    sdatekey edatekey staffstatu reason ID

    9 12 y a 12

    Table3

    sdatekey edatekey level tel address ID

    5 11 z b c 12

    i wanna this resultset;

    sdatekey edatekey title staffstatu reason level address tel

    5 9 NULL NULL NULL z c b

    9 10 NULL y a z c b

    10 11 x y a z c b

    11 12 x y a NULL NULL NULL

    12 15 x NULL NULL NULL NULL NULL

  • This was removed by the editor as SPAM

  • U can use Union clause to merge...

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply