4 Replies Latest reply: Apr 9, 2013 9:01 AM by riedelme RSS

    how can i create unique number on each call of sp.

    947771
      Hi,

      i want to insert unique number with out gaps in a col of a table every time my query runs . it shouel generate numbers from 1 to n.
      i can do it using sequence , but sequence need reseting and other user can reset it also and it creats gaps too.

      so please tel me is there any function/technique which can give me session or transaction specific unique number on each call to sp.

      pls consider i want to inserting these numbers in a table and insertion is going on in a loop.

      yours sincerely
        • 1. Re: how can i create unique number on each call of sp.
          Marwim
          Hello,

          this is the forum for {forum:id=260}.

          Please mark your question as answered (so others know that they can ignore it) and post again in {forum:id=75}.

          You might want to query the forum before posting, because this is a frequently asked question.
          https://www.google.de/search?q=site%3Aforums.oracle.com+gapless

          Regards
          Marcus
          • 2. Re: how can i create unique number on each call of sp.
            riedelme
            944768 wrote:
            Hi,

            i want to insert unique number with out gaps in a col of a table every time my query runs . it shouel generate numbers from 1 to n.
            i can do it using sequence , but sequence need reseting and other user can reset it also and it creats gaps too.

            so please tel me is there any function/technique which can give me session or transaction specific unique number on each call to sp.

            pls consider i want to inserting these numbers in a table and insertion is going on in a loop.

            yours sincerely
            this is a SQL issue. This forum is for SQL Developer (not for general SQL/PL/SQL questions) to discuss issues relating specifically to SQL*DEveloper. The issue you described will affect any Oracle development tool.

            You should get a better answer if you close this thread and re-post in the SQL and PL/SQL forum SQL and PL/SQL You can also perform a Google search using the right keywords; the forum search has not worked for me since last year.
            • 3. Re: how can i create unique number on each call of sp.
              Marwim
              April 15th will be the beginning of a new golden era of this forum. I'm sure it will include an omniscient search feature :-)
              {thread:id=2519003}

              Until then it's the best to include "site:forum.oracle.com" in your google search
              • 4. Re: how can i create unique number on each call of sp.
                riedelme
                Marwim wrote:
                April 15th will be the beginning of a new golden era of this forum. I'm sure it will include an omniscient search feature :-)
                There will be weeping and gnashing of teeth on April 15. Not because of the new golden era on OTN (although that remains a possiblity) but because that's the day taxes are due in the US
                Until then it's the best to include "site:forum.oracle.com" in your google search
                Excellent advice!