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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using a Single Item Query Return as Query Criteria

Status
Not open for further replies.
Jan 20, 2005
180
US
I have a query that returns a PO# only.
I need to be able to use this po# as a criteria in a later query

so it would look something like
select sum(Amount) from table where po > [return po# from query]

 
Hi!

Use your query as a subquery:

select sum(Amount) from table where po > (What you put in here is the SQL for your subquery that will return a single value)

hth


Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
Hmm.. tried that was giving me errors, will try it agian so see if I can get it to work.
 
Hi!

If you want to post all of the sql for your query we will see if we can help.



Jeff Bridgham
Purdue University
Graduate School
Data Analyst
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top