Welcome to SPN

Register and Join the most happening forum of Sikh community & intellectuals from around the world.

Sign Up Now!

Where Statement query

Discussion in 'Information Technology' started by Margaret, Jul 28, 2006.

  1. Margaret

    Margaret
    Expand Collapse
    Guest

    I have a large table which is made up of many months worth of appended data.
    Each months import (which contains duplicate information from the month
    before) has a period attributed to the record (ie JUL, AUG, SEP etc) and has
    a DIE (directly incurred expense) field for the record.

    What I am trying to create is a query that will read the table and fill in a
    field with a build along the lines of "ACTUAL JUL:[MONTHLY DIE] where PERIOD
    = JUL" then in a field two over, there would be another one - pointing to the
    same table "ACTUAL AUG: [MONTHLY DIE] where PERIOD = AUG"

    I have never used a where statement in a build before and not sure if
    possible. If anyone has any suggestions I would appreciate it.

    Cheers
    Margaret
     
  2. Loading...


  3. Douglas J. Steele

    Douglas J. Steele
    Expand Collapse
    Guest

    Its not obvious to me how your table is structured. Are you saying that the
    DIE value for each month is a separate field in the same row (with the field
    names including the Month information), or is each DIE value a separate row
    (where there's another field in the same row that indicates which month it
    is)?

    If it's the former, your query is going to be quite difficult. If the
    latter, you need to create a number of subqueries, each of which returns the
    specific month's information, and then join the subqueries to one another.

    Without knowing what your tables look like, though, I can't give you a
    complete answer.

    --
    Doug Steele, Microsoft Access MVP
    http://I.Am/DougSteele
    (no private e-mails, please)


    "Margaret" <Margaret@discussions.microsoft.com> wrote in message
    news:DC0555C2-B6E7-4422-ADBD-8A84AA8F8C39@microsoft.com...
    >I have a large table which is made up of many months worth of appended
    >data.
    > Each months import (which contains duplicate information from the month
    > before) has a period attributed to the record (ie JUL, AUG, SEP etc) and
    > has
    > a DIE (directly incurred expense) field for the record.
    >
    > What I am trying to create is a query that will read the table and fill in
    > a
    > field with a build along the lines of "ACTUAL JUL:[MONTHLY DIE] where
    > PERIOD
    > = JUL" then in a field two over, there would be another one - pointing to
    > the
    > same table "ACTUAL AUG: [MONTHLY DIE] where PERIOD = AUG"
    >
    > I have never used a where statement in a build before and not sure if
    > possible. If anyone has any suggestions I would appreciate it.
    >
    > Cheers
    > Margaret
     
  4. Joseph Meehan

    Joseph Meehan
    Expand Collapse
    Guest

    Margaret wrote:
    > I have a large table which is made up of many months worth of
    > appended data. Each months import (which contains duplicate
    > information from the month before) has a period attributed to the
    > record (ie JUL, AUG, SEP etc) and has a DIE (directly incurred
    > expense) field for the record.
    >
    > What I am trying to create is a query that will read the table and
    > fill in a field with a build along the lines of "ACTUAL JUL:[MONTHLY
    > DIE] where PERIOD = JUL" then in a field two over, there would be
    > another one - pointing to the same table "ACTUAL AUG: [MONTHLY DIE]
    > where PERIOD = AUG"
    >
    > I have never used a where statement in a build before and not sure if
    > possible. If anyone has any suggestions I would appreciate it.
    >
    > Cheers
    > Margaret


    The query makes it easy. You don't need to write the statement, just
    use the query's criteria function.

    --
    Joseph Meehan

    Dia duit
     

Share This Page