Generate Random Number in 6i

To discuss Oracle Forms & Reports related technical issues.
Post Reply
Kashif
Posts: 137
Joined: Wed Apr 26, 2006 5:57 am
Location: Pakistan
Contact:

Generate Random Number in 6i

Post by Kashif »

Dear Group Memebers.

I want to generate Random number of Length of 8 Digit.

How can i do this In Forms 6i.

Please Immidiate response is required

Best Regards.

Muhammad Kashif
najm
Posts: 74
Joined: Wed Apr 05, 2006 8:04 am
Location: Pakistan

Post by najm »

we can't clear you question please write in a bit of detail

Chears

Najm
Kashif
Posts: 137
Joined: Wed Apr 26, 2006 5:57 am
Location: Pakistan
Contact:

Post by Kashif »

I want to generate RANDOM NUMBER.

I think there is Nothing to Clear.

Best Regards.

Muhammad Kashif
admin
Posts: 2063
Joined: Fri Mar 31, 2006 12:59 am
Location: Pakistan
Contact:

Post by admin »

Select dbms_random.value from dual
Kashif
Posts: 137
Joined: Wed Apr 26, 2006 5:57 am
Location: Pakistan
Contact:

Post by Kashif »

Thankx for helping.

Here is another which i found on the Web.

select dbms_random.random from dual

dbms.random.value always return decmial values.
while dbms_random.random returns without Decimal.



Best Regards.

Muhammad Kashif
riv_sax
Posts: 16
Joined: Thu Aug 31, 2006 8:14 am
Location: South Africa

Post by riv_sax »

Hi,
I am Attaching the code for random number generation
But tell me how to attach a file in here.
regards
riv


<blockquote id="quote"><font size="1" id="quote"><b id="quote">quote" HEIGHT="</b id="quote"></font id="quote"><table border="0" id="quote"><tr id="quote"><td class="quote" id="quote"><font size="1" id="quote">Dear Group Memebers.

I want to generate Random number of Length of 8 Digit.

How can i do this In Forms 6i.

Please Immidiate response is required

Best Regards.

Muhammad Kashif

<i><div align="right">Originally posted by Kashif
admin
Posts: 2063
Joined: Fri Mar 31, 2006 12:59 am
Location: Pakistan
Contact:

Post by admin »

Email me and I will look at the code if it is your own code then I will upload and if it is not your own then upload on any free upload server and provide the link. thanks
riv_sax
Posts: 16
Joined: Thu Aug 31, 2006 8:14 am
Location: South Africa

Post by riv_sax »

hi,
tell me how to attach a file with this message then i will give u the code

regards
riv
riv_sax
Posts: 16
Joined: Thu Aug 31, 2006 8:14 am
Location: South Africa

Post by riv_sax »

Hi admin,
i am copying my code do attach it so that others get it

Add this code in when-button-pressed trigger
and cteate a text item to view result(:view)


Declare
r Number;
i Number;
a Number;
Begin
Default_Value('0','Global.Counter');
:Global.Counter := To_Number(:Global.Counter)+1;
:View := :Global.Counter;
r := (10223*(:View) + 1) Mod 45231;
:View := r;
End;

Regards
Rivon Saxon

[quote]Email me and I will look at the code if it is your own code then I will upload and if it is not your own then upload on any free upload server and provide the link. thanks

<i><div align="right">Originally posted by admin
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest