<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.00.2920.0" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=687320314-24092003>All in
SQL. I just figured out how to get the first day of the
year:</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=687320314-24092003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=687320314-24092003>select
DATEADD(yy, DATEDIFF(yy,0,getdate()), 0) /* first day of
year*/</SPAN></FONT></DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN
class=687320314-24092003></SPAN></FONT> </DIV>
<DIV><FONT color=#0000ff face=Arial size=2><SPAN class=687320314-24092003>So now
I am on to trying to figure out how to get the first day of the prior month and
the last day of the prior month.</SPAN></FONT></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV align=left class=OutlookMessageHeader dir=ltr><FONT face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B> paul.hartland@fsmail.net
[mailto:paul.hartland@fsmail.net]<BR><B>Sent:</B> Wednesday, September 24,
2003 10:02 AM<BR><B>To:</B>
dba-sqlserver@databaseadvisors.com<BR><B>Subject:</B> Re: [dba-SQLServer]SQL
Last Full Month<BR><BR></DIV></FONT>are you doing this entirely in SQL Server
or using Access or VB as a front-end ?<BR><BR><BR><BR>
<BLOCKQUOTE
style="BORDER-LEFT: #ff0000 2px solid; MARGIN-LEFT: 5px; PADDING-LEFT: 5px">Message
date : Sep 24 2003, 02:44 PM <BR>From : Nicholson, Karen
<KNICHOLSON@GPSX.NET><BR>To : Dba-Sqlserver (E-mail)
<DBA-SQLSERVER@DATABASEADVISORS.COM><BR>Copy to : <BR>Subject :
[dba-SQLServer]SQL Last Full Month <BR>Does anyone have a quick Last Full
Month solution in SQL? I need to run <BR>reports for the prior month, and
have about 25 lines of code to get to the <BR>last full month. Thanks in
advance. <BR>_______________________________________________
<BR>dba-SQLServer mailing list <BR>dba-SQLServer@databaseadvisors.com
<BR>http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
<BR>http://www.databaseadvisors.com
<BR><BR></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>