PL/SQL (MOSC)

MOSC Banner

Get a subset of a result set based on condition

edited Apr 16, 2014 12:00PM in PL/SQL (MOSC) 11 commentsAnswered

Hi ,

I have the following query

SELECT DETAILS.TIMESHEET_NBR, DETAILS.START_TIME, DETAILS.STANDBY_CD, DETAILS.DURATION

FROM TIMESHEET_VSL_OPS_DETAILS DETAILS

JOIN TIMESHEET_VSL_OPS OPS ON (DETAILS.TIMESHEET_NBR = OPS.TIMESHEET_NBR)

WHERE OPS.VAR_NBR =? AND OPS.EDO_ESN_NBR = ? AND OPS.REC_STATUS ='A' 

ORDER BY DETAILS.TIMESHEET_NBR, DETAILS.START_TIME, DETAILS.STANDBY_CD

I need to get the rows of the result set between the first occurence of DETAILS.STANDBY_CD = '55' and first occurence of DETAILS.STANDBY_CD = '76'.

Kindly help. Thanks

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center