By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,728 Members | 1,355 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,728 IT Pros & Developers. It's quick & easy.

How do I create a query col that checks if data is in another query

P: 3
I have a table with orders, with various statuses. Each order has an id. If the order is current the status is active. However if the order has been modified, the id receives an extension, and the status is changed to pending. In the table I have a column that strips order id of any extensions. I have a query that indicates the base order id that filters out the active orders, and one that filters out the pending orders.

What I really need is to have a column in the active orders query that indicates if there is a matching base order id in the pending query. If there is then there are a few values from the pending query that I need to display in the active query (displaying is easy enough I think, its the first conditional (is this base id present in the pending query that I can't figure out to do).

I don't think I have any code really. Everything has been done so far via the wizard and all the SQL contains are the basic select all fields from the table statement.
Aug 4 '10 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.