generate a random number between 1 and 10

Dear All;

I have an insert... Select and in one of the columns, I would like to generate a random number from 1 to 10, how is this possible. Thank you.

Select round (dbms_random.value (1,10)) double;

http://download.Oracle.com/docs/CD/B28359_01/AppDev.111/b28419/d_random.htm#CDEJAHCB

Tags: Database

Similar Questions

  • How to build a VI that generates a random number between 1 and 80... Help!

    Generate a VI that generates a random number between 1 and 80

    Divide the random number by a number specified in the front panel.

    If the number of seizures is zero, the VI program should light a LED in the face to indicate a divide by zero error.

    Hai edwardty2009,

    Welcome to the forum.

    Thanks for the congratulations.

    Your problem is solved? If so can you please mark as solution what post help better to solve your problem.

    Thank you

    Mathan

  • Generate a random number with a decimal point

    I searched all over the internet and cannot find how to generate a random number that had a decimal.

    I'm trying to randomly generate numbers between 12.0 and 13.0.

    Here is my code... I know its bad because of Math.round and Math.random, but I can't seem to find something that deals with a decimal...

    addEventListener (Event.ENTER_FRAME, fl_EnterFrameHandler_1);

    function fl_EnterFrameHandler_1(event:Event):void
    {
    Volt.Text = Math.round (Math.random () * (1) + 12) m:System.NET.SocketAddress.ToString ();
    }

    Any suggestions?

    -Pat

    Try this,

    addEventListener(Event.ENTER_FRAME, fl_EnterFrameHandler_1);
    
    function fl_EnterFrameHandler_1(event:Event):void
    {
    
         var rndNum:Number = int(Math.random()*10)/10; // Generate random num with 1 decimal place
         var newVal:Number = newVal + 12;
         volt.text = newVal.toString();
    }
    

    If you want 2 decimal places then replace the 10 per 100.

  • Generate a random number

    I have this function to generate a random number

    RandNum = genRand();

    public function genRand (): int
    {
    Return (Math.Random ());
    }

    but he seemed to generate the number is 0

    any1 have more luck with this?

    Hey,.

    According to the range of numbers you're trying to get it, you must either change the type returned or modfiy before he returned. What happens is the number that you generate is probably something like 0.9393 (example) and his cutting the comma because you return a value type int value (no decimals).

    try to modify the function to do this:

    public function genRand():int
            {
                return(Math.random() * 10);
            }
    

    and you will get a number from 0 to 10. If you want a number from 0 to 100, you can use 100 instead of ten, and so on. This will give you back not decimal numbers. If you want decimal numbers simply change the type of data returned to the number instead. hope that helps. Good luck!

  • Let a burn of LED on a random time between 3 and 7 seconds

    Hi all

    Probably, it's a matter of simpel for many of you, but not for me. I try to make a counter reaction time. And I hope someone can help me with the first part: the led must Flash on a random time between 3 and 7 seconds.

    After this need to measure the time between burning directed and by pressing the stop button

    Results ranking in a table

    After the display of ten measures of response time average.

    I hope someone can help me to launch it, I need it for school.

    Thank you!

    Matthijs

    Netherlands

    Code Simon put tapped off.  The Down button was a nice touch, but cannot be disabled so we were testing times preaction and the param 'Trial' could get pretty messy especially on a series of rehearsal

  • It seems that ' too low ' when should I appear "I think to a number between 0 and 99".

    It's mid Code pls HELP

    It would be really apracate it help (sorry for the bad English)

    package

    {

    import flash.display.Loader;

    import flash.display.Sprite;

    import flash.events.KeyboardEvent;

    import flash.events.MouseEvent;

    import flash.net.URLRequest;

    import flash.text. *;

    import flash.ui.Keyboard;

    [SWF (width = "550" height = "400" backgroundColor = "#FFFFFF", frameRate = "60")]

    SerializableAttribute public class NumberGuessingGame extends Sprite

    {

    Input/output vareables

    public var format: TextFormat = new TextFormat();

    public var output: TextField = new TextField();

    public var input: TextField = new TextField();

    Game Vareables

    public var startMessage:String;

    public var mysteryNumber:uint;

    public var currentGuess:uint;

    public void NumberGuessingGame()

    {

    setupTextField();

    startGame();

    playGame();

    }

    public void setupTextField()

    {

    Set the text format objects

    format.font = "Helventica";

    format. Size = 32;

    format. Color = 0xFF0000;

    format. Align = TextFormatAlign.LEFT;

    Configure the output text field

    output.defaultTextFormat = format;

    output. Width = 400;

    output. Height = 80;

    output. Border = true;

    output.wordWrap = true;

    output. Text = "this is the output text field";

    View and place the output text field

    stage.addChild (output)

    output.x = 70;

    output.y = 65;

    Configure the text entry field

    format. Size = 60;

    input.defaultTextFormat = format;

    Input.Width = 80;

    Input.Height = 60;

    Input.Border = true;

    Input.Background = true;

    input.backgroundColor = 0xCCCCCC;

    Input.Type = "entry";

    Input.Text = "";

    input.maxChars = 2;

    Input.Restrict = "0-9";

    input.displayAsPassword = false;

    Input.Selectable = true;

    Display the position of the input text area

    stage.addChild (input);

    Input.x = 70;

    Input.y = 150;

    internship. Focus = entry;

    }

    public function countryside (): void

    {

    currentGuess = uint (input.text);

    if(currentGuess > mysteryNumber)

    {

    output. Text = "which is too high.';

    }

    ElseIf (currentGuess < mysteryNumber)

    {

    output. Text = "which is too low.';

    }

    on the other

    {

    output. Text = "You got it!"

    }

    }

    public void keyPressHandler(Event:KeyboardEvent):void

    {

    if(Event.keycode == Keyboard.Enter) {}

    playGame();

    }

    }

    public function startGame (): void

    {

    Initialize variables

    startMessage = "I think to a number between 0 and 99;

    mysteryNumber = 50;

    Initialize the text fields

    output. Text = startMessage;

    Input.Text = "";

    Add an event listener for the presses

    stage.addEventListener (KeyboardEvent.KEY_DOWN, keyPressHandler);

    }

    }

    }

    Try to get rid of the playGame() function call in the NumberGuessingGame function.  If you call immediately the value of the hypothesis will be the default value of a uint (0) which is less than 50.

    public void NumberGuessingGame()

    {

    setupTextField();

    startGame();

    playGame();

    }

  • How to generate a random number within a specified tolerance and control than tolerance.

    I am trying to simulate data without using a data acquisition device using a random number generator and I want to be able to control the "range" the random number generated well.  On the front panel, the user can enter a nominal number, and the random number generator would generate numbers more or less disponibles.003 this number nominal.  The data would be delayed on a chart.  Someone knows how to do this?  Or if it is still possible?

    Just for the sake of information, the random number is supposed to resemble thickness measures, that's why I want to simulate more and less disponibles.003 because the data might be thinner or thicker than the nominal value.

    Thanks in advance!

    Two ways of approaching the issue.  First of all, for even distribution, you can 'Roll the dice', which is the (0,1) random number function, multiply the result by 0.06 and then add Mean - 0.03 to center around average distribution.  If you simulate a real process, my initial guess would be that the results would follow a normal distribution.  In this case, you can use the VI of white noise Gaussian of the palette of generation of signals with a standard deviation of 0.015 if you wanted 0.03 to be the point of 2 sigma, then add average results.

  • generate a random number in a range of duplication no

    Good day people,

    I need help once again. I want to animate an image inside a movieclip with frame label animate1, animate2, animate3 and animate4.

    I managed to generate random numbers, but my concern is I want my animation not animate same image twice, here is my code.

    = main time line code =.

    function randRange(min:Number,_max:Number):Number {}
    Generate a number between and including min - max
    var randomNum:Number = Math.floor (Math.random () *(max-min)) + min;
    Return randomNum;
    }


    build table to hold the frame label names
    var frameArray:Array = new Array();
    frameArray [0] = "animate1";
    frameArray [1] = "animate2";
    frameArray [2] = "animate3";
    frameArray [3] = "animate4";

    Get created random number
    var n: Number = plageAleatoire (0, frameArray.length);


    trace ("n": + n);


    Stop Frame label name
    This.img_ani.gotoAndStop (frameArray [n]);


    trace ("frameArray:" + frameArray [n])

    = label code and frame inside a clip with 4 frames containing different pictures =.

    as layer: stop();

    image tag: animate1, animate2, animate3, animate4

    Any help is greatly appreciated. Thanks in advance.

    It is not a routine of brewing, integrated, but there is a pretty standard shuffle function that was happening around...

    var frameArray:Array = new Array();
    frameArray [0] = "animate1";
    frameArray [1] = "animate2";
    frameArray [2] = "animate3";
    frameArray [3] = "animate4";

    function shuffle (a) {}
    var p;
    var t;
    Ivar var;
    for (ivar =. Length-1; Ivar > = 0; Ivar-) {}
    p = Math.Floor ((Ivar+1) * Math.Random ());
    t = a [ivar];
    a [ivar] = a [p];
    a [p] = t;
    }
    }

    trace (frameArray);  See the property before shuffle

    Use:
    Shuffle (frameArray);

    trace (frameArray);  Show after shuffle

  • Generating unique random number with a Boolean signal on an RT target

    Hello, this is my first time asking your question. I apologize if I post this question in the wrong Council.

    [What I'm trying to do]

    I am stable heating and cooling in an experimental space that I (with cRio9024).

    And I'm putting a different experimental condition in space based on the function 'random number '.

    'Different experimental conditions' sense different combinations of Tind, Twat_s and mdot (refer to the attached VI).

    For example, if I get the Boolean TRUE signal.

    I should have a set of [Tind, Twat_s, mdot] = [21,14,0.05], and IS this set of numbers until this Boolean signal goes to FALSE.

    And when the signal passes to the TRUE once again.

    I should have a different set of [Tind, Twat_s, mdot] = [24,16,0.15] for example.

    [I]

    Problem I am with my code is that,

    When the VI is running, the random number remains the same as the Boolean signal is set to TRUE.

    From what I tried so far for the last couple days, using 'the event structure' was the message more concerned that I found,

    However, LabView help tells me that "structure of the event" on the objectives of the RT do not support the events associated with the user interface such as the façade of VI or controls panels.

    I would therefore ask a quick help, since my knowledge of LabView is exhausted at this point.

    This is so the part where I want to generate random numbers, WHEN this structure case is TRUE.

    convert whole numbers, random numbers

    Use them as a table index,

    while I can choose conditions from radom to the given set of conditions.

    Once more, I want to do is,

    generate a SINGLE random number series when the structure above is TRUE.

    Hope I have developed quite clear.

    I'm appreciated for any kind of advice.

    Thank you!

    You just need to store the Boolean from the previous run. Then the logic would be (I'll call her Boolean previous B_prevand current boolean B):

    If B AND B_prev > don't generate new values

    otherwise if B > generate new values

    Edit: to store your Boolean value, you can use a feedback node, or a loop with N = 1 and a registry change.

  • Wireless network problem: disconnects randomly anywhere between 1 and 4 hours.

    I have a wireless network problem, it disconnects randomly anywhere between 1 h and 4 h. The network consists of a Samsung 4 G hotspot and a Linksys AE1000. The signal strength is excellent, the AE1000 is 1 ft of the computer and 1 ft of the HotSpot.  The computer is a Dell Dimension 2400. Any ideas?

    Hi Jack,

    Problem solved.  I did 2 assumptions about the original problem.  I assumed that the 2 Tech that I spoke made the hurt their product. Battery saver has been activated on the hotspot.

    Thanks again

    Greg

  • Firefox randomly changes between fullscreen and windowed mode

    While I use Firefox mode window it will change randomly a fashion advertising full screen, it will change between these modes constantly. I tried to reset Firefox, but this has not solved the problem.
    The only way I managed to keep it from constantly change is by going in the Task Manager with ctrl + alt + delete.

    Do the same with other browsers?

    Now after looking around a bit, I think I've found some information. If you are experiencing a different problem from that let me know.
    Try this link. https://support.Mozilla.org/en-us/Que.../913975

  • How to generate a random integer between 1-5?

    If I use random how can I convert an integer?

    Alana says:
    What exactly does the I32?

    "Of I32' converts your floating-point to integer number, as you specified in your first post as a requirement.

    Here's a version that gives all 5 numbers with equal probabilities. Instead of explicitly convert I32, I use + 1 output configuration. Same difference.

  • BlackBerry Smartphones Save a number between SMS and contacts?

    Guys, I'm new to BlackBerry - got my first today in the form of a storm.

    Already, I can't understand something:

    If someone sends me an SMS, so how to save this number directly as a new contact in the address book?

    Congratulations in advance.

    in the message, click on its number (should say mobile besideit) and click on the bb button and that there should be an option to add to contacts

  • Random number between a solution of beach

    Hello

    I need to place an object on the stage.x at random but won't.

    The scene is 1024 pixels and the 726 object. I do the following, it works well, but sometimes a part of the object goes from the scene. Could you tell me what I did wrong?

    menucenter = internship. Width - _root.object._width;
    _root. Object._x = Math.Floor (Math.Random () * (menucenter - 0))-0;

    Thank you

    George

    If object a reg point home left the edge use:

    _root. Object._x = Math.Random () * menucenter;

  • Generator of random numbers with Page break

    Hello

    I was wondering if it is possible to write a JavaScript script that will:

    -generating a random number

    -When a random number is generated, a specific page in the document is loaded.

    For example, when 4 is generated, from 1 to 6, you would jump to page 10, when 5 is built, you

    jump to page 20, etc.

    The idea is that when you press the key which is linked this javascript, you will automatically be

    go to a random page.

    This would be possible at all?

    Thank you!

    Kind regards

    Fabian

    It is possible, but your description is not very clear. What is the relationship between the random number and the page you jump to? Why not just generate a random number between 1 and N (N being the number of pages in the file), and then go to this number?

Maybe you are looking for

  • Sat - M70: estimated time remaining on battery

    I ve just bought a Satellite M70-144 and have a question about running on battery When you use a stack operating on remaining battery time is displayed as a percentage in Toshiba Power Saver. On my old Toshiba laptop and other portable I ve used, the

  • Create a Module of Csharp/DLL from scratch?

    I want to create a module/DLL in C Sharp (Visual Studio .NET 2008) from scratch.  This module will be called from the Tools menu of the TestStand, and it will take a qualified full path of the file in the sequence class as input.  But I do not know h

  • Don't scan-to-computer - says its not connected... Printer HP Photosmart 7510.

    I've recently upgraded to a newer computer with Windows 7 installed.  I am running XP.  My Photosmart HP 7510 was loaded in my new system and seems to work perfectly for everything but sweep.  The message indicates that it is not connected, but when

  • DualBOOT

    I recently dualbooted windows xp and windows 7 as a whole, my problem is when I reboot the system, it does not give me the option to choose which OS I want to run it comes automatically runs under windows xp, and I don't know how to make Windows 7. H

  • BlackBerry Smartphones Can I have out of several email addresses on one device?

    I have a BB 8700 g (t-mobile), but I'm ready to upgrade/change of provider.  Device mgr software is ver 4.7. I have and intend to keep, NON-enterprise service.  I have now sent E-mail to the device of multiple e-mail addresses, but when you reply, th