Create Link for Among Three Tables In SQL

Answered Create Link for Among Three Tables In SQL

  • Thursday, February 21, 2013 10:36 AM
     
     

    hi

    Please help me out in the following situation. i dont understand what type of query used to get result.

    I have 4 tables and i want user_name on the basis on IncidentID. But Username is belongs to a different table and the fields which relate them also present in different tables. But All tables belongs to same DB.

    table_incident.Id
    table_incident.Entitydimkey

    table_workitemdim.Entitydimkey
    table_workitemdim.workitemdimkey

    table_workitemassign.workitemdimkey
    table_workitemassign.workitemassign_userdimkey

    table_userdim.userdimkey
    table_userdim.firstname

    Please tell me urgent what should i do..

    Thanks in advance
    Regards
    M Ahsan Misbah

All Replies

  • Thursday, February 21, 2013 11:03 AM
     
     Answered

    Hello,

    There will some key columns in each table through which table are linked (I mean Primary key, Foreign Key) if there will be a relation between your table you can find it . do one this right in query window

    1. Right click in query window

    2. Design query in editor

    3. Add your related table

    click oK, you will get query now if there is relation based on that you can have joins and select your columns 




    blog:My Blog/

    Hope this will help you !!!
    Sanjeewan