Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Database > SQL Language
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 2nd, 2007, 05:07 AM
Registered User
Join Date: Aug 2007
Location: Bangalore, Bangalore, India.
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
Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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

All times are GMT -4. The time now is 01:55 AM.

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