[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] Prior Month
- Subject: RE: [sqr-users] Prior Month
- From: Ramzi_Salameh@daveandbusters.com
- Date: Fri, 12 Mar 2004 10:14:33 -0600
- Delivery-date: Fri, 12 Mar 2004 11:15:50 -0500
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
For SQL Server you could use
SELECT MONTH(DATEADD(mm, -1, GETDATE()))
------------------------------------------------
Ramzi Salameh
PeopleSoft Technical Analyst
Dave & Busters, Inc.
Voice (214) 904-2550
Fax (214) 350-0941
------------------------------------------------
|---------+------------------------------------------------------------>
| | "Maria Ravanis" <Maria_Ravanis@skillsoft.com> |
| | Sent by: |
| | sqr-users-bounces+ramzi_salameh=daveandbusters.co|
| | m@sqrug.org |
| | |
| | |
| | 03/12/04 08:56 AM |
| | Please respond to "This list is for discussion |
| | about the SQR database reporting language from |
| | Hyperion Solutions." |
| | |
|---------+------------------------------------------------------------>
>-----------------------------------------------------------------------------------------------|
|
|
| To: "This list is for discussion about the SQR database
reporting language from |
| Hyperion Solutions." <sqr-users@sqrug.org>
|
| cc:
|
| Subject: RE: [sqr-users] Prior Month
|
>-----------------------------------------------------------------------------------------------|
Unfortunately I am on SQL Server 2000
________________________________
From: sqr-users-bounces+maria_ravanis=skillsoft.com@sqrug.org on behalf of
George Jansen
Sent: Fri 3/12/2004 9:49 AM
To: sqr-users@sqrug.org
Subject: Re: [sqr-users] Prior Month
If you are using Oracle, Add_Months(Sysdate, -1) will work, for example
SQL> l
1 SELECT Trunc(Add_Months(Sysdate, -1), 'Month')
2* FROM dual
SQL> /
TRUNC(ADD_M
-----------
01-FEB-2004
SQL>
>>> Maria_Ravanis@skillsoft.com 03/12/04 09:26AM >>>
Does anyone have any code to identify the month prior based on the
system date? I looked in the archives but couldn't get any of that
code
to work in my SQR.
Thanks - Maria
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
Here was a non admissible message part of 'application/ms-tnef' MIME
type. It has been automatically discarded before sending the message to
the list.
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users