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 |
|
pavlos
Yak Posting Veteran
59 Posts |
Posted - 2012-07-30 : 20:35:03
|
| Hey Guys,I have a results table that returns warehouse codes and item codes.egWH IC1, A11, A32, A32, A62, A73, B64, B65, B76, A36, A1all items exist in all warehouses but I only want to return the rows where an item exists in the warehouse from the above query.I was thinkingsomething like this:where itemcode and warehouse IN (select query)but that doesn't work.If i go where item code in (select query)andwarehouse in (select query)it will return way too many rows.hope this makes sense. |
|
|
pavlos
Yak Posting Veteran
59 Posts |
Posted - 2012-07-30 : 21:12:28
|
| ignore guys,i did this with a left join and removed nulls.sorry |
 |
|
|
|
|
|