[AccessD] select distinct per year

Pedro Janssen pedro at plex.nl
Mon Apr 21 05:50:47 CDT 2003


Hi Susan,

i thought this could be done with a select distinct, but i wasn't sure

This what i have

TableA

Date                           num1            num2
01-02-2000               5,2                   4,1
02-03-2000               4,6                   4,3
01-04-2001               4,2                   6,5
14-07-2001               6,2                   3,1
 

This is what i want;
in this example the calculation is sum

Date                          num1              num2
2000                          9,8                    8,4
2001                          10,4                  9,6

Pedro Janssen


  ----- Original Message ----- 
  From: Susan Harkins 
  To: accessd at databaseadvisors.com 
  Sent: Saturday, April 19, 2003 11:01 PM
  Subject: Re: [AccessD] select distinct per year


  But you want only unique records based on both the record and the date field? I don't understand how DISTINCT fits in. 
   
  Susan H. 
    ----- Original Message ----- 
    From: Pedro Janssen 
    To: accessd at databaseadvisors.com 
    Sent: Saturday, April 19, 2003 2:38 PM
    Subject: Re: [AccessD] select distinct per year


    Hello Susan,

    sorry i wasn't clear enough.
    For example: TableA   has a date field and a number field.
    What i need is to make calculations on alle the record for the number field for each year.
     
    TIA

    Pedro Janssen 
      ----- Original Message ----- 
      From: Susan Harkins 
      To: accessd at databaseadvisors.com 
      Sent: Saturday, April 19, 2003 6:46 PM
      Subject: Re: [AccessD] select distinct per year


      SELECT DISTINCT  fldlist|*
      FROM table
      WHERE  DatePart("yyyy",datefield) = year
       
      =======But I'm guessing that's not really what you're after -- I'm not sure I understand -- you want the results for a particular year, or you want them all, just grouped by their year?
       
      Susan H. 
        Hello Group,

        how can i make an select disctinct for all the record in a date field (dd-mm-yyyy) per year??

        TIA

        Pedro Janssen


------------------------------------------------------------------------


        _______________________________________________
        AccessD mailing list
        AccessD at databaseadvisors.com
        http://databaseadvisors.com/mailman/listinfo/accessd
        Website: http://www.databaseadvisors.com



--------------------------------------------------------------------------


      _______________________________________________
      AccessD mailing list
      AccessD at databaseadvisors.com
      http://databaseadvisors.com/mailman/listinfo/accessd
      Website: http://www.databaseadvisors.com



----------------------------------------------------------------------------


    _______________________________________________
    AccessD mailing list
    AccessD at databaseadvisors.com
    http://databaseadvisors.com/mailman/listinfo/accessd
    Website: http://www.databaseadvisors.com



------------------------------------------------------------------------------


  _______________________________________________
  AccessD mailing list
  AccessD at databaseadvisors.com
  http://databaseadvisors.com/mailman/listinfo/accessd
  Website: http://www.databaseadvisors.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030421/eeea6f5b/attachment-0001.html>


More information about the AccessD mailing list