Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

query on a table

Status
Not open for further replies.

vb4me

Programmer
Nov 27, 2001
48
US
Hello,

I have a query that works no problem if I base it on criteria of a single value - e.g if it = ACDF.

What I want to do is run the query based on a table of multiple values - so I want it to return only values where it = the values in a table. E.g ACDF, ANGUS, etc

I keep getting a message to run it in a query and include the query in the query but I cannot get it working.

Any help would be appreciated.
 
unclear--what are the fields in the tables, how are your tables set up? is what you are saying is that you have one table with all your data in it, then a second table with criteria in it? have you created a query with a join between the fields that hold the data and the criteria? please explain more. thanks.
 
Yes I have created a query with a join between the fields that holds the data and the criteria. This query works no problem.

This query will update quantities if the product is equal to the product in another table.

My problem is that I now want to add another criteria field to this query. I did this and if it equaled ACDF then it will only update this customer with that code. This worked fine.

I then wanted to base the update on a group of customers defined in a table. To do this I added a field in the query that has the criteria to equal the table with the customer code in it.

I get the error message - The SQL statement could not be executed because it contains ambiguous outer joins. To force one of the joins to be performed first, create a separate query that performs the first join and then include that query in you SQL statement.

So I tried creating a select query that selected the customers.

I then based the criteria of the customer code in the first query on this second query - same error message.

I'm sorry if I am not explaining it correctly but I am trying to get my head around it also.

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top