crownedzero
Registered User.
- Local time
- Today, 01:48
- Joined
- Jun 16, 2009
- Messages
- 54
I'm still tinkering through a project I've tasked myself with and I've come into a small issue with running a query. The SQL state below removes all ItemNumbers from discontinued stock that have 0 available quantity in any of its sizes.
I also need this query to append data that does not meet one of several ItemNumbers i.e. DP9*, DI*, PA9* etc. as these represent our faulty/defective items.
Is this best left as two seperate queries? If not how can I combine two seperate statements?
Code:
[COLOR=#000000]INSERT INTO tblBSLR ( ItemNumber )
SELECT tblInventory.ItemNumber, *
FROM tblInventory
WHERE (((tblInventory.ItemNumber) In (select ItemNumber from tblInventory
where Type = 'F' or (Type = 'D' and Available > 0))));
[/COLOR]
I also need this query to append data that does not meet one of several ItemNumbers i.e. DP9*, DI*, PA9* etc. as these represent our faulty/defective items.
Is this best left as two seperate queries? If not how can I combine two seperate statements?