Solved

Error in dbms_random.random

Posted on 2006-10-25
3
867 Views
Last Modified: 2008-01-09
hi experts,

  The following error message is recieved in the resin.stderr
  java.sql.SQLException: ORA-01426: numeric overflow
  ORA-06512: at "SYS.DBMS_RANDOM", line 188

  when following The following query is executes

  select user_id from ( select
  dbms_random.random, user_id from users where locale = 'es_usa and nickname is NOT NULL  and sex_id = 2
  and rownum <= 5000 order by 1 )

  what is this and why is this happening ?
regards,
0
Comment
Question by:umar1farooq
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 250 total points
ID: 17801678
please try this:

  select user_id from ( select
  dbms_random.value(1,10000), user_id from users where locale = 'es_usa and nickname is NOT NULL  and sex_id = 2
  and rownum <= 5000 order by 1 )
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question