Records In a Single Table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Shalini Bhalla
    New Member
    • Dec 2007
    • 190

    Records In a Single Table

    I have two tables emp_master and relations_detai ls having Ins_no as a common field ............... ....

    emp_master contain all info related to employee and relation_detail s contain details of all family members of employee .....



    Code:
    emp_master 
    
    Ins_no      Name 
    123           xyz
    
    
    
    relation_detail 
    
    Ins_no   name relation
    123        xy   brother
    123        xz   brother
    123        yz   sister
    123        ab   mother



    For some reason i have to make a single table for both





    Code:
    emp_master 
    
    Ins_no      Name       relation1      name    relation2  name 
    123           xyz          brother          xy         brother   xy

    The Problem is that i have already tablew entered in 2 tables and now i want all entries as single , how can i do that ?
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32661

    #2
    Are you asking how to show all entries for Ins_No=123 in a single line of output?

    Comment

    • Shalini Bhalla
      New Member
      • Dec 2007
      • 190

      #3
      Yes , i want all family members in a sigle row , irrespective of no of brothers or sisters ............... .......not in out put but in a new table or in a query
      Last edited by NeoPa; Jun 30 '08, 01:18 PM. Reason: Tidy post

      Comment

      • missinglinq
        Recognized Expert Specialist
        • Nov 2006
        • 3533

        #4
        And how many "child" fields do you plan on having? Four? Six? A dozen? You're talking about adding fields in a combined table when you should be adding records in your relation_detail table. In other words, you're talking about going from doing this correctly, which is how you currently have it set up, to doing it incorrectly!

        Originally posted by Shalini Bhalla
        For some reason I have to make a single table for both
        What is the reason that makes you feel that you have to have a single table?

        Linq ;0)>

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32661

          #5
          What would be the design of your output data, whether in Query or Table?

          This needs consideration. As you may have worked out from Linq's post, almost anything you say here will be wrong, as this request makes little logical sense. Try to answer this anyway as it may help you realise what we're talking about.

          Comment

          Working...