954,593 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

How to get multiple records against one record based on relation?

I have two tables Organisation and Employee having one to many relation i.e one organisation can have multiple employees. Now I want to select all information of a particular organisation plus first name of all employees for this organisation. What’s the best way to do it? Can I get all of this in single record set or I will have to get multiple rows based on no. of employees? Here is a bit graphical demonstration of what I want:
Org_ID Org_Address Org_OtherDetails Employess
1 132A B Road List of details Emp1, Emp2, Emp3.....

openhash
Newbie Poster
2 posts since Aug 2008
Reputation Points: 10
Solved Threads: 0
 

Plz post table structure

if you have any matching fields in both the tables say Org_ID
you can use a join to get the data if the format you specified

varmadba
Junior Poster in Training
83 posts since Jun 2008
Reputation Points: 22
Solved Threads: 9
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You