Solved

Error in dbms_random.random

Posted on 2006-10-25
3
849 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
3 Comments
 
LVL 142

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
What is the version of ojdbc6.jar 2 60
case statement in where clause 5 48
How to Gracefuly recover in Racle stored procedure 1 30
Oracle DB monitor SW 21 50
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…
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…
Via a live example, show how to take different types of Oracle backups using RMAN.
This video shows how to configure and send email from and Oracle database using both UTL_SMTP and UTL_MAIL, as well as comparing UTL_SMTP to a manual SMTP conversation with a mail server.

803 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