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 |
|
ak56s
Starting Member
3 Posts |
Posted - 2002-10-28 : 18:40:42
|
| I am doing a query with a join to find everything paula harris and mitch edwards ordered. I can search for only one name at a time, but I can't figure out how to search for both, which Ineed to do. Here is my select statement which works, but I need to be able to search for both names. select first, last, order_date, item_desc from customer, cust_order, item, order_line, inventory where customer.cust_id = cust_order.cust_id and cust_order.order_id = order_line.order_id and order_line.inv_id = inventory.inv_id and inventory.item_id = item.item_id |
|
|
ValterBorges
Master Smack Fu Yak Hacker
1429 Posts |
Posted - 2002-10-28 : 18:47:01
|
| select first, last, order_date, item_desc from customer, cust_order, item, order_line, inventory where customer.cust_id = cust_order.cust_id and cust_order.order_id = order_line.order_id and order_line.inv_id = inventory.inv_id and inventory.item_id = item.item_id WHERE customer.first + customer.last IN ('paulaharris', 'mitchedwards') |
 |
|
|
ak56s
Starting Member
3 Posts |
Posted - 2002-10-28 : 18:59:39
|
| I tried that, but it didn't work, here is the error I got in Oracle.SQL> @testWHERE customer.first + customer.last IN ('PaulaHarris', 'MitchEdwards')*ERROR at line 7:ORA-00933: SQL command not properly endedInput truncated to 1 charactersSP2-0042: unknown command "'" - rest of line ignored. |
 |
|
|
Merkin
Funky Drop Bear Fearing SQL Dude!
4970 Posts |
Posted - 2002-10-28 : 20:43:04
|
| Ahhh there is your first problem (other than crossposting). We are an SQL Server site. So SQL Server is assumed. You might be better off at an Oracle siteDamian |
 |
|
|
|
|
|
|
|