Wrox Programmer Forums
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old August 2nd, 2007, 05:07 AM
Registered User
Join Date: Aug 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Query building

Hi All,
I wish to build a query that will return a resultset compiling records from the 2 tables.

Employee Table
Id Name

Earnings Table

Id EarningsId Amount
1 1000 100
1 2367 500
2 586 1000
2 875 502
2 54 600

Output must be
Id Name
1 ABC 100 500
2 DEF 1000 502 600

The problem is theres no specific description for the EarningsId. A person can have any number of earnings. Theres no defined set of earnings id. It may or may not vary from person to person. Can anyone help in building the query to get my desired output

Thanks and Regards,
Anju Renjith

Similar Threads
Thread Thread Starter Forum Replies Last Post
running out of field in query building yixchen Access 2 December 19th, 2005 10:19 AM
Building Cross Query... ZArrinPour SQL Server 2000 4 October 19th, 2005 06:33 PM
Building accounting receivable query mustafayildirim@msn.com Access 1 April 26th, 2005 06:45 AM
Building JK2 jakawan BOOK: Professional Apache Tomcat 1 December 18th, 2004 02:32 PM
Need help understanding Building a Query by form watrout Access VBA 3 March 4th, 2004 01:58 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.