Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 Access SQL Inner Join

Author  Topic 

mdixon44
Starting Member

26 Posts

Posted - 2008-05-17 : 00:08:11
I have a question about inner joins. By using a lookup table and a row function, I have the following question and code. I am not sure if it right or not. I would appreciate any assistance:

For every type of food in the l_foods table, list the following:

The full name of the supplier from the l_suppliers table. The description of food from the l_foods table The price from the l_foods table plus the price_increase from the l_foods table; rename it to total_price

When price increase is null, assume that the 10 cents will be added to the price. Sort this information ty the total price.

SELECT a.supplier_name,
b.description,
b.price + (b.price_increase + 10) AS total_price
FROM l_suppliers AS a
INNER JOIN l_foods AS b
ON b.supplier_id =a.supplier_id
ORDER BY total_price


Orange- l_foods table
Blue - l_supplier table
Red - within both tables.

That is far as I got without error.

jsmith8858
Dr. Cross Join

7423 Posts

Posted - 2008-05-17 : 09:15:37
mdixon44 --

DO you think you would get better help if you asked your teacher or classmates to assist you?

- Jeff
http://weblogs.sqlteam.com/JeffS
Go to Top of Page

mdixon44
Starting Member

26 Posts

Posted - 2008-05-17 : 11:13:45
I wish I could.. but I am doing self-study. I was hoping that you could assist me. I would appreciate it.



quote:
Originally posted by jsmith8858

mdixon44 --

DO you think you would get better help if you asked your teacher or classmates to assist you?

- Jeff
http://weblogs.sqlteam.com/JeffS


Go to Top of Page
   

- Advertisement -