Merge Data

  • Thread starter Thread starter Iain West
  • Start date Start date
I

Iain West

Hi All,

I have a database which contains an ID field, Name Field, Percent Field,
Date Field. The ID field is not unique and contains records which all map
back to a singlar ID. This information is stored in another table, with the
Fields ID and Group Name.

What I would like to do is create a new field called Top Ten and have a
macro to get the data from tabel 1 and place it in the field in table 2 in a
format like

As at: Date
0% Name
0% Name
0% Name
0% Name
0% Name
0% Name
0% Name
0% Name
0% Name
0% Name
Source: Data Provider

I have tried to do a query but can't get it to work.

Can anybody give me a few pointers.

Many thanks in advanced.
 
I'm not positive I'm understanding your schema 100%, but here's a query you
can use to pull the top 10 from a table which might help:

SELECT TOP 10 percentField, nameField
FROM myTable
WHERE id = xyz
ORDER BY percent;

This should give you your top 10 with small modifications as fit your
scenario, then you can use the result set to build the field contents for
your entry into the second table.
Hope this helps.
--
Bryan Reich
Microsoft Office
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of any included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm


"Iain West"
 
Back
Top