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 |
|
sambrown180
Starting Member
38 Posts |
Posted - 2008-12-09 : 12:56:34
|
| for this query i need to use two tablesorder and a product tablein my order table i have Order_No (int), Customer_ID (int), and Product_price (vchar), and in the product table i have availability (vchar)now can anyone please tell me the query i need to show the customers who have made an order but the product is out of stock |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-09 : 13:05:29
|
| [code]SELECT o.Customer_IDFROM Order oJOIN Product pON p.Product_ID=o.Product_IDWHERE p.availability='False'[/code] |
 |
|
|
sambrown180
Starting Member
38 Posts |
Posted - 2008-12-09 : 13:14:03
|
| i also want it to show the Product_size prodct_colour product_price and the product_id how would i do this |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-12-09 : 13:20:29
|
quote: Originally posted by sambrown180 i also want it to show the Product_size prodct_colour product_price and the product_id how would i do this
see now...this is what i told you before also. why cant you post the expected output in beginning itself. did you had time to look at link i posted yet?SELECT *FROM Order oJOIN Product pON p.Product_ID=o.Product_IDWHERE p.availability='False' replace * with columns you want |
 |
|
|
|
|
|