|
|
Getting info from two tables with disimilar headings
I have two tables of similar (but not identical) headings and different data
in each table similar to below. Prices change each day and are listed in the
prices tables
TblPrices
Date A B C
24/02/2010 2.66 3.14 1.32
25/02/2010 2.72 3.21 1.39
26/02/2010 2.62 3.14 1.30
TblCurrentPrice
Product Current Price
A 2.62
B 3.14
C 1.30
I put in a new price everyday in the TblPrice and I would like to make a
query to update the TblCurrentPrice with the most recent price, so I can
then use the data from there, elsewhere in the database but I cannot figure
out how to make a query to update the TBLCurrentPrice from TblPrice as there
is no common link. Can anybody please explain how this can be done. My Sql is
extremely limited, so step by step would be really appreciated. If it were in
excel I simply use
vlookup with a cell to reference the most recent date but I don't know how or
if this can be done in Access.
I can make a table of the current prices with the same headings as the
TblPrices but ths is not what I need as I need to reference current price A
(or B or C) in another part of the database.
--
Very Grateful for all and any help.
Steve
|
|
0
|
|
|
|
Reply
|
Utf
|
3/1/2010 4:34:01 PM |
|
You approach this wrongly.
You don't need a 'current price' table when you already have the data in
your tblPrices table.
You need a query that extracts the latest price from the tblPrices table and
you should use that.
Your tblPrices table is also poorly designed, you need a serapare row for
each price/date/part. Do not combine prices into one row. When properly
designed, it becomes easy to find the latest price.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
"Steve" wrote:
> I have two tables of similar (but not identical) headings and different data
> in each table similar to below. Prices change each day and are listed in the
> prices tables
>
> TblPrices
> Date A B C
> 24/02/2010 2.66 3.14 1.32
> 25/02/2010 2.72 3.21 1.39
> 26/02/2010 2.62 3.14 1.30
>
> TblCurrentPrice
> Product Current Price
> A 2.62
> B 3.14
> C 1.30
>
> I put in a new price everyday in the TblPrice and I would like to make a
> query to update the TblCurrentPrice with the most recent price, so I can
> then use the data from there, elsewhere in the database but I cannot figure
> out how to make a query to update the TBLCurrentPrice from TblPrice as there
> is no common link. Can anybody please explain how this can be done. My Sql is
> extremely limited, so step by step would be really appreciated. If it were in
> excel I simply use
> vlookup with a cell to reference the most recent date but I don't know how or
> if this can be done in Access.
>
> I can make a table of the current prices with the same headings as the
> TblPrices but ths is not what I need as I need to reference current price A
> (or B or C) in another part of the database.
> --
> Very Grateful for all and any help.
> Steve
|
|
0
|
|
|
|
Reply
|
Utf
|
3/1/2010 4:47:01 PM
|
|
|
1 Replies
159 Views
(page loaded in 0.014 seconds)
Similiar Articles: How do I Transfer Data from one table to another - microsoft ...I have two tables of similar (but not identical) headings and different data in each table similar to below. Prices change each day and are listed i... Compare Multiple Fields in Two Tables and Show Whats Different ...Both tables are built the same and have the same column headings (for the sake of this query, I will ... tables - microsoft ... MS ACCESS :: Update Two Different Tables Change column headings in crosstab querry - microsoft.public ...I created a crosstab query and I want to change two of the column headings. ... I'm trying to create a query that uses the same table to name two different ... Getting information from several surveys in Access - microsoft ...I have 3 tables because there are three different surveys but there are similar questions in ... Getting information from several surveys in Access - microsoft ... What I ... Combine 2 spreadsheets by parsing from one to the other ...I have two tables one has First Name and Last Name fields. The ... Excel - Combine Two Spreadsheets With Different Column Headings ... How do I combine two spreadsheets of ... Mutiple Table Entry into One form Wthout using subforms ...... all I have created a form by adding information from several differnt forms and table as they areall getting ... data from a main form/subform into a different table ... One last try - microsoft.public.access.gettingstartedThought I would give it one more try. How do I run a calculation that uses a field from 2 different tables? Table A - field, current Table 2 - f... 2 Diff Page numbering schemes - microsoft.public.word ...... at the bottom that relates to the headings (i.e., 2 ... that calculates the pages in the table (section breaks before and after, used SectionPages field). Two different ... how do I add data from one table to another table? - microsoft ...I have created a database in Access 2007 that contains two main tables along with ... >> >> Why do you feel that you need to store *the same data* in two different >> places? TOC Formating - TOC Styles aren't actually changing the font ...... template but in messing with the look of things I looked at many different lists for headings ... Table of contents font problems ... to change the font of my table of ... How to merge Excel worksheets with Merge Tables WizardThe two tables can be located in the same Microsoft Excel file or in two different files. The intuitive and smart wizard guides you through the merge process. Data Tables: Identify data table row and column headingsData Tables Identify data table row and column headings. Imagine a table with no column or row headings. Each table cell would exist without context, making it ... Table (information) - Wikipedia, the free encyclopediaNOTE: Multidimensional tables, 2-dimensional as in the example ... tool, a table allows a form of generalization of information from an unlimited number of different social ... HTML TablesHTML Headings HTML Paragraphs HTML Formatting HTML Editors HTML CSS HTML Links ... How to specify different table borders. (You can find more examples at the bottom of this ... Microsoft Word: Getting Header Row to repeat across pages, table ...table headings, header row, word features: Hi Stacey, I don’t know about you but with me there is always some trick to getting a lot of Word features to work. 7/24/2012 4:00:48 PM
|
|
|
|
|
|
|
|
|