Solved

Error in dbms_random.random

Posted on 2006-10-25
3
858 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

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines

740 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