<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<TITLE>Message</TITLE>
<META content="MSHTML 6.00.2800.1141" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=958254211-21042003><FONT face=Arial color=#0000ff size=2>In SQL
the query is:</FONT></SPAN></DIV>
<DIV><SPAN class=958254211-21042003><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=958254211-21042003><FONT face=Arial color=#0000ff size=2>select
datepart(yyyy,dateentered), sum(num1), sum(num2)<BR>from TableA<BR>group by
datepart(yyyy,dateentered)</FONT></SPAN></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=958254211-21042003>In Access, substitute the year() function for
datepart().</SPAN></FONT></FONT></FONT></DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=958254211-21042003></SPAN></FONT></FONT></FONT> </DIV>
<DIV><FONT face=Arial><FONT color=#0000ff><FONT size=2><SPAN
class=958254211-21042003>Arthur</SPAN></FONT></FONT></FONT></DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV></DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B>
accessd-bounces@databaseadvisors.com
[mailto:accessd-bounces@databaseadvisors.com] <B>On Behalf Of </B>Pedro
Janssen<BR><B>Sent:</B> April 21, 2003 6:51 AM<BR><B>To:</B>
accessd@databaseadvisors.com<BR><B>Subject:</B> Re: [AccessD] select distinct
per year<BR><BR></FONT></DIV>
<DIV><FONT face=Arial size=2>Hi Susan,</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>i thought this could be done with a select
distinct, but i wasn't sure</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>This what i have</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>TableA</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>Date
num1
num2</FONT></DIV>
<DIV><FONT face=Arial
size=2>01-02-2000 5,2 4,1</FONT></DIV>
<DIV><FONT face=Arial
size=2>02-03-2000
4,6
4,3</FONT></DIV>
<DIV><FONT face=Arial
size=2>01-04-2001
4,2
6,5</FONT></DIV>
<DIV><FONT face=Arial
size=2>14-07-2001
6,2
3,1</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>This is what i want;</FONT></DIV>
<DIV><FONT face=Arial size=2>in this example the calculation is
sum</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial
size=2>Date
num1
num2</FONT></DIV>
<DIV><FONT face=Arial
size=2>2000
9,8 8,4</FONT></DIV>
<DIV><FONT face=Arial
size=2>2001 10,4
9,6</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Pedro Janssen</FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV> </DIV></BLOCKQUOTE></BODY></HTML>