Home Forums SQL Server 2005 T-SQL (SS2K5) how to write query to show in desired table fomat RE: how to write query to show in desired table fomat

  • you need to use FULL OUTER JOIN

    SELECT ISNULL(t1.name, t2.name) AS name

    ,t1.JANclient

    ,t2.FRBClient

    FROM Table1 AS t1

    FULL OUTER JOIN Table2 AS t2 ON t2.name = t1.name

    However, as "name" is highly unlikely to be unique, you are going to have screwed results.

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]