AnsweredAssumed Answered

How can i fetch the last record from a sub object using NSQL

Question asked by himani.sharma on Feb 3, 2011
Latest reply on Feb 3, 2011 by himani.sharma
Hi
My query fetches all the records from the sub object.I wish to fetch the last what do i do.I tried MAX(date) it dosent work.Or may be i am writing a wrong NSQL its all new to me.

Here is the query

SELECT @SELECT:DIM:USER_DEF:IMPLIED:id:cor.id:ID@,

@SELECT:METRIC:USER_DEF:IMPLIED:cor.odf_parent_id:ProjectID@,
@SELECT:METRIC:USER_DEF:IMPLIED:cor.edb_status_date:Date@,
@SELECT:METRIC:USER_DEF:IMPLIED:cor.edb_coract1:Schedule@,
@SELECT:METRIC:USER_DEF:IMPLIED:cor.edb_coract2:Actions_Resource@,
@SELECT:METRIC:USER_DEF:IMPLIED:cor.edb_coract3:Actions_cost@,
@SELECT:METRIC:USER_DEF:IMPLIED:cor.edb_coract4:Quantity@,
@SELECT:METRIC:USER_DEF:IMPLIED:cor.edb_coract5:Overall_Risk@,
@SELECT:METRIC:USER_DEF:IMPLIED:cor.edb_coract6:Customer_Relations@,
@SELECT:METRIC:USER_DEF:IMPLIED:cor.edb_corrective_act:Global_Sourcing@


from odf_ca_project_status cor
where cor.odf_parent_id = @WHERE:PARAM:XML:INTEGER:/data/id/@value@
AND @FILTER@



WHat more should i add to the where

thanks in advance
Himani

Outcomes