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

having a few synatx errors in my queries

Status
Not open for further replies.

arobbo

IS-IT--Management
Feb 15, 2005
62
GB
hi basically i'm trying to display the purchase order of the last order in a given time frame, i'm finding that using max(order_Date) isn't working , is there a way i can use max(order_Date) in my where clause or something like Where (order_Date) is the greatest

????

anyone got any ideas
 
Something like:

Select * from mytable inner join (Select max(order_date) as MO from mytable where order_date >=#01/01/2004# and order_date<#01/01/2005#)) as q1
on mytable.order_date = q1.mo

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top