Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2012
    Posts
    14

    Unanswered: while mapping 3 tables data getting twised - help

    dear all,
    while i am mapping 2 tables, datas are matched and fine, but while mappring three tables it shows twised the data,

    in my condition, one table has customer_no and other table has customer_id. but i dont have any common variables to map these two tables. so i am using another table which is having customer_no and customer_id to put a bridge between them. but while mapping 2 of these tables it gives correct value, but while doing 3 table mapping it shows thrise the data.. please explain..

  2. #2
    Join Date
    Jan 2004
    Location
    Croatia, Europe
    Posts
    4,094
    Provided Answers: 4
    Why do you think that anyone is capable of debugging a code he/she doesn't see?

    If there are 3 tables involved, you should have at least 2 joins in WHERE clause; otherwise you'd get a (partial) Cartesian product (which might be what you have, according to the description).

  3. #3
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    SOMETHING LIKE
    Code:
    select ...
    from table1 a,table2 b,table3 c
    where a.customer_no = b.customer_no
    and b.customer_id = c.customer_id;
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

Posting Permissions

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