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.
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_priceWhen 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_priceFROM l_suppliers AS aINNER JOIN l_foods AS bON b.supplier_id =a.supplier_id ORDER BY total_priceOrange- l_foods tableBlue - l_supplier tableRed - 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?- Jeffhttp://weblogs.sqlteam.com/JeffS |
 |
|
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?- Jeffhttp://weblogs.sqlteam.com/JeffS
|
 |
|
|
|
|