Wortz, Charles
CWortz at tea.state.tx.us
Mon Apr 21 07:43:57 CDT 2003
Pedro, It is Grouping you want, not distinct. And Sum(num1) and Sum(num2). Charles Wortz Software Development Division Texas Education Agency 1701 N. Congress Ave Austin, TX 78701-1494 512-463-9493 CWortz at tea.state.tx.us -----Original Message----- From: Pedro Janssen [mailto:pedro at plex.nl] Sent: Monday 2003 Apr 21 05:51 To: accessd at databaseadvisors.com Subject: Re: [AccessD] select distinct per year Importance: Low 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 <mailto:harkins at iglou.com> 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 <mailto:pedro at plex.nl> 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 <mailto:harkins at iglou.com> 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/31987b1e/attachment-0001.html>