Page 1 of 1

Generate Random Number in 6i

Posted: Fri Jul 14, 2006 8:31 am
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

Posted: Fri Jul 14, 2006 8:43 am
by najm
we can't clear you question please write in a bit of detail

Chears

Najm

Posted: Fri Jul 14, 2006 9:10 am
by Kashif
I want to generate RANDOM NUMBER.

I think there is Nothing to Clear.

Best Regards.

Muhammad Kashif

Posted: Fri Jul 14, 2006 9:52 am
by admin
Select dbms_random.value from dual

Posted: Fri Jul 14, 2006 10:33 am
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

Posted: Mon Sep 18, 2006 8:10 am
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

Posted: Mon Sep 18, 2006 8:57 am
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

Posted: Tue Oct 10, 2006 7:45 am
by riv_sax
hi,
tell me how to attach a file with this message then i will give u the code

regards
riv

Posted: Mon Oct 16, 2006 1:28 am
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