AnsweredAssumed Answered

How to slice date >= 'current month' in NSQL???

Question asked by Riya on Oct 5, 2010
Latest reply on Oct 19, 2010 by another_martink
Hello everyone,
Can anyone please let me know how i need to give slice date < = 'CURRENT MONTH' to pass the month value into the NSQL WHERE clause?

When i query in database i can hard code it to use slice date < = '2010/01/08' but i'm creating a portlet for the user to track hours for every month. Please let me know. I really appreciate your help.

>
SELECT
SUM(SLICE) AS ACTUAL_HRS,
R.FULL_NAME,
P.NAME PROJECT
FROM
NIKU.PRJ_BLB_SLICES S,
NIKU.PRASSIGNMENT A,
NIKU.PRTASK T,
NIKU.SRM_RESOURCES R,
NIKU.SRM_PROJECTS P
WHERE
S.PRJ_OBJECT_ID = A.PRID AND
A.PRTASKID = T.PRID AND
T.PRPROJECTID = P.ID AND
A.PRRESOURCEID = R.ID AND
SLICE_REQUEST_ID = 4
AND MONTH(S.SLICE_DATE) = 06 -- instead of hardcoded value i need pass current month value
GROUP BY
FULL_NAME,
P.NAME



Does anyone have any documentation on NSQL queries please let me know. I'm a beginner to clarity.

Thank you
RM

Outcomes