PL/SQL (MOSC)

MOSC Banner

Get a particular unused number within a particular range

edited Jun 24, 2013 4:32AM in PL/SQL (MOSC) 10 commentsAnswered
Hi Gurus,

Ineed to create a function that would give a particular number within a particular range. Sample you are assigning an id for an item. Giving only numbers id in a particular range. But number the item could be manual and also auto generated. But during the auto generated it should also get inside this range and it should be the unused one.

Scenario: Number range 0001 - 9999

I have to pick the UNUSED number inside this range,

0001 - unused

0002 - used

0003 - unused

0004 - unused

0005 - used

...

On the give above, when i kicked the function it should give me first the 0001 as it is unused then it should jump to the next unused number which is 0003.

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