Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Generating random string not like - example

sgudipudiAug 20 2013 — edited Aug 21 2013

Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production

Hi,

I want to generate a random one char string of which is not like a char.

select str from (select DBMS_RANDOM.STRING('U',1) str from dual) where str!='A';

some times i am getting NULL. How can i get some char all the time? i want to create a function using this logic. can some one help me to achieve this?

Thanks,

sg

This post has been answered by Manik on Aug 21 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 18 2013
Added on Aug 20 2013
8 comments
2,129 views