Click here to Skip to main content
15,910,121 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Can u give me the query for selecting fields from more than one table...
Posted
Updated 22-Dec-10 1:43am
v2
Comments
Rajesh Anuhya 22-Dec-10 8:25am    
No Effort..

Can you google? Here's one link out of the 86 THOUSAND returned with the search phrase "linq multiple tables query":

http://social.msdn.microsoft.com/forums/en-US/linqprojectgeneral/thread/d7bc0df4-68f7-4e19-91b6-4c163378001f/[^]

 
Share this answer
 
You need to use a JOIN clause.
 
Share this answer
 
v2
Hello,

you can write your code like this

SELECT ARE.ID ,
            A.FirstName ,A.LastName, ARE.RoundID, ARE.AdmIVEvalCriteriaID, IVC.IVEvalCriteria, ARE.PointsScored
        FROM Employee ARE
        INNER JOIN Round A ON ARE.plicationID = A.ID
        INNER Join ICompany IVC ON ARE.AdmIVEvalCriteriaID = IVC.ID
        WHERE ARE.ID= A.EmpID and A.AdmissionID = ARE.AdmID AND ARE.RoundID IVRoundID
        ORDER BY ARE.RoundID, AdmApplicationID;



IF any query send your code

Regards,

Satan singh
 
Share this answer
 
v2
Go through the below link


Here [^]
 
Share this answer
 
Off course you need to join a table.

See Basic JOIN Article HERE[^]
 
Share this answer
 
which database?

JOINs[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900