PL/SQL (MOSC)

MOSC Banner

logic in code

edited Feb 17, 2016 4:06AM in PL/SQL (MOSC) 5 commentsAnswered

Hello ,

I have written below code: I want that if next value in loop(snap_id as id1 variable) is not incremented by 1 like if snap_id=69130 initially and then this is 69132 so I mean if there are some gaps like this then the snap id should be populated otherwise not.I have defined another variable id2 -each time when loop would be iterated this is checking if id1 (new value in loop) is equal to id2(previous value in loop) +1 - if not then print that snap_id but this is not giving desired output .Now,there is no gap in snap id actually

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