This is a discussion on "multiple table data retrieval with function" within the Databases section. This forum, and the thread "multiple table data retrieval with function are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
multiple table data retrieval with function
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
multiple table data retrieval with function
I want to retrieve similar data from two tables then add those two results together.
How would I do this: Table one Id1, bloggs, tuition fees (40) Table two Id1, bloggs, tuition fees (10) Id2, bloggs, tuition fees (20) Id2, bloggs, tuition fees (10) Recordset: Id1 bloggs tuition fees (40) Id1, bloggs, tuition fees (10) Id2, bloggs, tuition fees (20) Id2, bloggs, tuition fees (10) total should be tuition fees = 80 Here I want to search on 'bloggs' then add the tuition fees together. How do I not get duplicate data. I have tried different joins and unions but am getting confused by the whole busines. SELECT dbo.payments.tuition, dbo.paymentAdd.tuition AS tuition2 FROM dbo.payments FULL OUTER JOIN dbo.paymentAdd ON dbo.payments.student_id = dbo.paymentAdd.student_id Many thanks for any help. |
|
|
![]() |
| Tags |
| joins, transact sql, union |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how access data from table in php, | azeemserver | PHP Forum | 2 | Aug 30th, 2007 11:09 |
| passing data accross multiple pages | nate2099 | PHP Forum | 2 | Jul 8th, 2007 15:26 |
| writing a function to verify data inputted in textboxes | jayaime | JavaScript Forum | 2 | Jul 4th, 2006 03:29 |
| ACCESS: one table one data,and only one! | Monie | Databases | 1 | Aug 2nd, 2004 09:00 |
| ACCESS: one data in one table | Monie | Classic ASP | 1 | Aug 2nd, 2004 08:52 |