[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

RE: [sqr-users] Working with dates



The problem may be in the way that you place your parentheses when you are
selecting the date.  I have tried the following query which appears to give
the type of results you are looking (note though I am using Maximo 4.1.1 and
Oracle 8i).

If the where part of the query is 
        To_date(Targstartdate,'MON') = $month and
to_date(TargStartDate,'YYYY') = $year or (TargStartDate is null and
(to_date(ReportDate, 'MON') = $month and to_date(ReportDate, 'YYYY') =
$year))

This appears to give the type of result you are looking for.

Again, this is Oracle syntax.  You will probably need to change it to work
correctly with SQLServer.

Aaron Sandler

-----Original Message-----
From: McCown, Larry [mailto:larry.mccown@ngc.com] 
Sent: September 21, 2005 1:55 PM
To: This list is for discussion about the SQR database reportinglanguage
from Hyperion Solutions.
Subject: [sqr-users] Working with dates

Hello it's me, Larry again still trying to work out this date issue
problem for about 3 weeks now.
Let me explain what I need and maybe someone can help guide me. This
sounds so easy I can't believe I am still struggling with it.

SQLServer 7.0 Maximo 4.0.3

Within the workorder table I need to identify when a work order is/was
scheduled to be worked.  If there is a targstartdate then I want to use
it as the "scheduled work date", if not then I need to use the
reportdate as the "scheduled work date".  I then need to pull only the
work orders were the "scheduled work date" matches that of the month and
year as input by the requestor.  

I can get the report do display the "scheduled work date" properly but
only seeing the work orders for the month/year has been the trouble
spot.

Or using the datepart I can get only the month/year but not for the
"scheduled work date" on the targstartdate or reportdate.

Sorry to keep bothering you with this one. Any suggestions will be
appreciated.
Thank you
Larry
Larry.mccown@ngc.com


 





_______________________________________________
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