Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / March 2007

Tip: Looking for answers? Try searching our database.

Help with SQL Query for Microsoft Access

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kbhat@kaxy.com - 14 Mar 2007 20:44 GMT
Suppose I have an inventory database in Microsoft Access in which I
try to keep information about products, their description, price and a
history of price changes.

Suppose TBL_1 has the following fields:
Product_Code [key], Product_Description

and

TBL_2 has the following fields:
Product_Code [key], Price, Date_of_price_assignment

Date_of_price_assignment is the date on which I assign a price to the
product.

I would like to design a query in which I specify a date and the
database retrieves the price of the product for the corresponding
date.  For example, let us assume that Product_Code 65 had a Price of
$36 assigned to it on January 12th and a Price of $27 assigned to it
on July 3rd.  If we query the product information for February 23rd, a
value of $36 is returned for the price.  If we query the product
information for August 1st, a value of $27 is returned for the price.

Any help will be appreciated.

Thanks,
Bhta
Allen Browne - 15 Mar 2007 02:56 GMT
Your table is correctly designed, and you can retrieve the price for a date
using a subquery.

Tom Ellison explains the details here:
   http://allenbrowne.com/ser-58.html

If subqueries are new, see:
   http://allenbrowne.com/subquery-01.html

Signature

Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

> Suppose I have an inventory database in Microsoft Access in which I
> try to keep information about products, their description, price and a
[quoted text clipped - 23 lines]
> Thanks,
> Bhta
kbhat@kaxy.com - 16 Mar 2007 17:44 GMT
> Your table is correctly designed, and you can retrieve the price for a date
> using a subquery.
[quoted text clipped - 6 lines]
>
> --

Thanks.  Example 58 really helped.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.