Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

help needed with the query

curious_mindFeb 10 2021

Hi All,
I have a query,
Select distinct eods_grp_id,GRP_FP_IND,max(evnt_tstp)evnt_tstp from (
(SELECT FG.eods_grp_id,EVNT_TYP_CDE,
CASE
WHEN FG.eods_grp_id IS NOT NULL AND FB.EVNT_TYP_CDE IN ('planShared','firmPublishedImmediately') THEN 'Y'
WHEN FG.eods_grp_id IS NOT NULL AND FB.EVNT_TYP_CDE IS NULL THEN 'N'
WHEN FG.eods_grp_id IS NOT NULL AND FB.EVNT_TYP_CDE in ('accessRevoked','factFinder','dataGathering', 'factFinderCompleted','dataGatheringCompleted','factFinderCanceled','firmCreatedConsolidated') AND FB.EVNT_TSTP > TRUNC(SYSDATE) - interval '90' day THEN 'N'
ELSE
'Y' END AS GRP_FP_IND,FB.evnt_tstp
FROM fp_grp FG, fp_bus_evnt FB,grp g
WHERE FG.fp_grp_id = FB.fp_grp_id
and FG.eods_grp_id = g.eods_grp_id
and g.GRP_CTG_CDE = '001'
and g.GRP_INAC_DTE is null
and g.prtt_cde = 'CGA_1'
AND FG.prtt_cde = 'FP_0'
AND FB.prtt_cde = 'FP_0'
and g.eods_grp_id='13193049'))
GROUP BY eods_grp_id,GRP_FP_IND;
and data is coming like this:
EODS_GRP_ID GRP_FP_IND EVNT_TSTP
13193049 Y 20-JAN-21 07.37.41.000000000 PM
13193049 N 20-JAN-21 07.34.26.000000000 PM

but my requirement is to get this particular record because it has latest timestamp.
13193049 Y

please suggest on this.

This post has been answered by RogerT on Feb 10 2021
Jump to Answer

Comments

fac586
Answer

I haven't figured out how to do it using declarative Open Region DAs, or the documented API. From hints here and here I've got a solution using the underlying widget methods.
Modify the card link icon HTML Expression to use a data attribute instead of an id:

<a href="#" class="t-open-popup" data-empno="#EMPNO#">
 <span class="fa fa-user" aria-hidden="true"></span>
</a>

This provides JavaScript with a simpler, more direct way to access the unique card key value.
Change the DA Execute JavaScript Code:

var empno = this.triggeringElement.dataset.empno,
    o = { autoOpen: true,
          parentElement: "[data-empno=" + empno + "]",
          callout: true,
          relativePosition: "after" };

$('#showDetails').popup(o);

See demo on page 586 of your app.

Marked as Answer by Veerendra Patil · May 20 2021
1 - 1

Post Details

Added on Feb 10 2021
1 comment
76 views