Re: Merge Data

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Bryan Reich [MSFT] (brreich_at_online.microsoft.com)
Date: 02/10/04


Date: Tue, 10 Feb 2004 14:13:14 -0800

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"
<iaindotwest@removethiswhenyoureplyiainwestandalsoremovethis.net> wrote in
message news:%23yDbtIC7DHA.3304@tk2msftngp13.phx.gbl...
> 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.
>
>


Relevant Pages

  • Schema location in SQL Server
    ... I am trying to locate where the schema is located in SQL server i want ... to write a query to pull out information but i cannot find it. ...
    (microsoft.public.sharepoint.portalserver)
  • Re: Unkown LDAP query
    ... Something is definitely trying to lookup lots of schema objects. ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... The only reason I suspect it is the query is because it looks like ... queries that are almost identical. ...
    (microsoft.public.windows.server.active_directory)
  • Re: error pulling data from query using a command button on a form
    ... You can't refer to fields in queries that way. ... What is DET1PERSONNEL1 Query? ... > 'I am attempting to pull data from a column in a query. ... > Private Sub UpDateSingleRecord_Click ...
    (microsoft.public.access.forms)
  • Re: Access Table Sorting/Query Last Function
    ... The table is set up as a datasheet. ... of the Lastin your totals query. ... I've been designing a database that basically works off two tables. ... I've done this so that I can pull the last entered ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Access Table Sorting/Query Last Function
    ... I've put in a number of test entries to ensure it works, ... of the Lastin your totals query. ... I've been designing a database that basically works off two tables. ... I've done this so that I can pull the last entered ...
    (microsoft.public.access.tablesdbdesign)