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 |
|
nflor001
Starting Member
2 Posts |
Posted - 2003-07-15 : 14:22:41
|
| list all the suppliers who supply at least one item that has not yet been ordered by anyone?? Whats the sql syntaxThanksord_no | id | sname | item | quantity1 | 1 | a_pro | veg | 22 | 1 | c_inc | flr | 13 | 2 | a_pro | cau | 10 4 | 2 | b_sup | stk | 25 | 2 | a_pro | let | 2 6 | 2 | c_inc | flr | 1sname | item | price | |a_pro | veg | 3.99a_pro | cau | 1.00a_pro | let | 0.75 b_sup | stk | 2.99c_inc | flr | 1.50c_inc | veg | 4.00 |
|
|
setbasedisthetruepath
Used SQL Salesman
992 Posts |
Posted - 2003-07-15 : 14:39:05
|
In general, you need to supply the actual DDL (the CREATE TABLE statements) for the tables relevant to your question, not some pretty-printed rowlist.Assuming I have tables called "orders" and "suppliers" ... :select distinct s.snamefrom suppliers swhere not exists ( select 1 from orders where item = s.item ) Jonathan{0} |
 |
|
|
|
|
|