Solved

Error in dbms_random.random

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

Join & Write a Comment

This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
This video shows how to recover a database from a user managed backup

743 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now