Results 1 to 5 of 5

Thread: Joins with three tables[Resolved]

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    May 2003
    Posts
    53

    Joins with three tables[Resolved]

    Hi,
    I want this result:

    ProductName FirstName SecondName
    Server Jesse James
    PC Peter Parker
    Laptop null null


    My problem is that ProductName comes from a different table, First Name and Last Name from user table and there is an association between the two in another table

    I have tried writing joins for this but am struggling right now. This was my earlier query when Firstyname and second name could not be null

    select product.productname, userprofile.firstname, userprofile.secondnamefrom userprofile, product, facilityuserassoc where facilityuserassoc.fk_product_user_type_id = 1 and facilityuserassoc.fk_product_id = product.pk_product_id and facilityuserassoc.fk_user_id = userprofile.pk_user_id

    Can you please have a look into this.
    Last edited by lpere68; Apr 12th, 2005 at 03:24 PM.
    I know that I know nothing.

Posting Permissions

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



Click Here to Expand Forum to Full Width