Wrox Programmer Forums
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 19th, 2005, 03:41 PM
Registered User
Join Date: Apr 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default date and price queries

I am working with a farm that has a table of crops with fields for crop name, crop price and modified date. I am trying to figure out an efficient means of date checking in the query process so I only obtain the one row with price for that particular date period. For example to create a current crop list I would create a query that only selects the row for most recent mod date. If the crop table has 9 rows and there are three rows for carrots, 4 for beets and 2 for turnips, I want to only select one carrot record, one beet and one turnip that would then give me the current price from that record. An archive table won't work since prices fluctuate at irregular intervals and reports need to be created monthly, quarterly and annually that reflect the prices that the crops sold for at that time, not current prices.
Any assistance would be most appreciated.

Old April 20th, 2005, 03:34 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 1,212
Thanks: 0
Thanked 1 Time in 1 Post

see here http://p2p.wrox.com/topic.asp?TOPIC_ID=25561 its the same thing. subquery syntax might be slightly different for Access.


Similar Threads
Thread Thread Starter Forum Replies Last Post
Select the latest date, then the lowest price. Stuart Stalker SQL Server DTS 2 October 12th, 2006 03:42 AM
date type queries mohiddin52 Access 5 July 29th, 2005 03:32 PM
get a lowest price Jane SQL Language 1 March 11th, 2005 10:02 AM
date type queries mohiddin52 Access 1 January 11th, 2005 01:41 PM
date type queries mohiddin52 Access 1 March 19th, 2004 03:05 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.