5

This article here suggests using dbms_random.value to select random values from a table.

My query

select value1, value2 from 
(select value1, value2 from my.table order by dbms_random.value) 
where rownum <100; 

Gives me

Error at Command Line:2 Column://column after the 'by'). 
Error report:
SQL Error: ORA-00904: : invalid identifier
00904. 00000 -  "%s: invalid identifier"

Any suggestions?

2 Answers 2

8

Insufficient user priviledges. Don't have access to the dbms_random package.

Sign up to request clarification or add additional context in comments.

Comments

3

You need to GRANT EXECUTE to your schema. Login as your SYS user and run the following, replacing 'your-schema-name' with the Oracle user who you wish to allow run DBMS_RANDOM.

GRANT EXECUTE ON DBMS_RANDOM TO your-schema-name;

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.