Results 1 to 2 of 2

Thread: Eliminate Duplicate

  1. #1
    Join Date
    Jun 2003
    Posts
    5

    Eliminate Duplicate

    Table A

    JobNo Claim ShipType
    A1 100 I
    A1 200 II

    Table B

    JobNo Cost
    A1 50
    A1 100

    Result Expected


    JobNO Cost Claim Shiptype
    A1 50 100 I
    A1 100 200 II

    Hi all,
    i've given a table structure with data
    and the expected result .
    I want to establish it in SQL server (7.0)
    If i establish the inner join i get 4 rows (2*2)
    Please let me know how to get the result
    Thanx in adv
    Tarriq

  2. #2
    Join Date
    Mar 2003
    Location
    NJ
    Posts
    201
    Since you didnt specify any condition for QA to execute and filter the result you want,it's retional to have such result.

    The following is one of the queries can lead the result you want


    select b.*,a.Claim,a.shiptype from tablea a,tableb b where Claim = 100 and Cost = 50 or Claim = 200 and cost = 100

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •