Results 1 to 5 of 5
  1. #1
    epardo87 is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Dec 2016
    Posts
    102

    Query multiplying data

    Hello,



    I'm running a query from another query [Qry-CertStat] but adding two more columns from two different tables related to that info [tbl-1-2-Estaciones] and [tbl-1-1-Subareas]

    what I want is the rows of the query exactly as they appear but adding the corresponding value of the two columns added from tables, this is the SQL:

    thanks for your time!

    Code:
    SELECT [Qry-CertStat].Estación, [Qry-CertStat].MaxOfFecha, [Qry-CertStat].Operador, [Qry-CertStat].DíasCert, [Qry-CertStat].Status, [Qry-CertStat].Due, [tbl-1-2-Estaciones].Subarea, [tbl-1-1-Subareas].Área
    FROM ([tbl-1-1-Subareas] INNER JOIN [tbl-1-2-Estaciones] ON [tbl-1-1-Subareas].[Subarea] = [tbl-1-2-Estaciones].[Subarea]) INNER JOIN [Qry-CertStat] ON [tbl-1-2-Estaciones].[StationDescription] = [Qry-CertStat].[Estación];

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    The joins can multiply data because of what's in the tables.
    you must be careful what you join.

  3. #3
    epardo87 is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Dec 2016
    Posts
    102
    Quote Originally Posted by ranman256 View Post
    The joins can multiply data because of what's in the tables.
    you must be careful what you join.
    Thanks ranman,
    I did this through the query wizard, don't really know how to do a query through SQL... how can I avoid the Joins?

  4. #4
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    When you join two (or more) sets of data you will always get the maximum number of rows - e.g. one row on one side but two rows on the other, this will always result in two rows displayed in the query. If you want only one row then either add more joins or use a query instead of the tables which has only the one record.

  5. #5
    epardo87 is offline Competent Performer
    Windows 7 32bit Access 2016
    Join Date
    Dec 2016
    Posts
    102
    Quote Originally Posted by aytee111 View Post
    When you join two (or more) sets of data you will always get the maximum number of rows - e.g. one row on one side but two rows on the other, this will always result in two rows displayed in the query. If you want only one row then either add more joins or use a query instead of the tables which has only the one record.
    Thank you,

    At the end, I deleted all the relationships inside the query and carefully dropped the corresponding value on top of the corresponding column linked, this fixed the problem

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Multiplying two values from the same column
    By jplank in forum Queries
    Replies: 1
    Last Post: 11-26-2013, 12:27 PM
  2. Multiplying columns with a WHERE condition
    By j9070749 in forum Access
    Replies: 14
    Last Post: 11-02-2013, 04:55 PM
  3. Replies: 5
    Last Post: 06-11-2013, 12:11 PM
  4. Multiplying two tables question
    By mmanzo1001 in forum Access
    Replies: 10
    Last Post: 10-14-2011, 10:14 AM
  5. Multiplying
    By chazcoral2 in forum Forms
    Replies: 16
    Last Post: 09-10-2010, 01:44 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums