<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2920.0" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Thanks to all who helped with this
sql.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Pedro Janssen</FONT></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A href="mailto:artful@rogers.com" title=artful@rogers.com>Arthur Fuller</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
href="mailto:accessd@databaseadvisors.com"
title=accessd@databaseadvisors.com>accessd@databaseadvisors.com</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, April 21, 2003 1:44
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [AccessD] select distinct
per year</DIV>
<DIV><BR></DIV>
<DIV><SPAN class=958254211-21042003><FONT color=#0000ff face=Arial size=2>In
SQL the query is:</FONT></SPAN></DIV>
<DIV><SPAN class=958254211-21042003><FONT color=#0000ff face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=958254211-21042003><FONT color=#0000ff face=Arial
size=2>select datepart(yyyy,dateentered), sum(num1), sum(num2)<BR>from
TableA<BR>group by datepart(yyyy,dateentered)</FONT></SPAN></DIV>
<DIV><FONT color=#0000ff face=Arial 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 align=left class=OutlookMessageHeader dir=ltr lang=en-us><FONT
face=Tahoma size=2>-----Original Message-----<BR><B>From:</B> <A
href="mailto:accessd-bounces@databaseadvisors.com">accessd-bounces@databaseadvisors.com</A>
[<A
href="mailto:accessd-bounces@databaseadvisors.com">mailto:accessd-bounces@databaseadvisors.com</A>]
<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 color=#0000ff face=Arial 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 color=#0000ff face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>TableA</FONT></DIV>
<DIV><FONT color=#0000ff face=Arial 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 color=#0000ff face=Arial size=2></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial 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 color=#0000ff face=Arial 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 color=#0000ff face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Pedro Janssen</FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2></FONT> </DIV>
<DIV> </DIV></BLOCKQUOTE>
<P>
<HR>
<P></P>_______________________________________________<BR>AccessD mailing
list<BR>AccessD@databaseadvisors.com<BR>http://databaseadvisors.com/mailman/listinfo/accessd<BR>Website:
http://www.databaseadvisors.com<BR></BLOCKQUOTE></BODY></HTML>