They needed to seek random rownum in a table

Hi all

I need to go get two records random table, every time I question him. for example my_emp_table if it contains the unique employee ID, is possible to write a query that would give a two records of employees at random, say for the first record of employee of 11 and 18 and next run 20 and 28.

We can get random values by select TRUNC (dbms_random.value (1,250)), TRUNC (dbms_random.value (1,250)) twice num
But how to use these values to get the nth record using sql?

Any help will be appreciated.

Thank you very much!!
-Shashank

See my solution for that!

select *
from ( select *
          from tab1
               , tab2
               , tab3
               , tab4
           where .....
           ORDER BY dbms_random.value
        )
where rownum <= 2

Published by: ascheffer on February 18, 2011 15:33

Tags: Database

Similar Questions

  • Computer does not open a floppy disk. He continues to say that they need to get in shape

    my machine does not open a floppy disk.  He continues to say that they need to be formatted (even brand new ones that really don't need). so I told him to get in shape. within 30-45 seconds, a screen appears and tells me that the disk cannot be formatted.  There is no help menu or solution for this that I can find anywhere. I run Win XP Home Edition with Service Pack 3. the format screen shows my NTFS file system and the disk is listed in RAW format, but there is no way to change this. Help!  Lots of info on those records that must be transferred to a more modern storage unit.

    Try to get data from old floppy disks can be a nightmare.  For starters, the magnetic media is not particularly stable and the disk may simply have deteriorated.

    More likely, however, that you use in the problem of the "media descriptor block.

    See http://support.microsoft.com/default.aspx?scid=kb;en-us;309623&Product=winxp and http://support.microsoft.com/kb/140060/en-%20us
    There seems to be at least 3 solutions of workarounds for this problem:

    1. find a Win95 computer with a floppy drive and use it to read the data and transfer it to support more modern.

    2. use a disk sector editor as described in 140060 KB (which may or may not work, depending on whether your current disk can read the disc even if Windows allows it to try)

    3 install the driver of 'mode 3' discussed in the following thread: http://tinyurl.com/cs5a5rp (Yes, viaarena link still works).

  • phone calls claiming I erros on my computer and they need to connect to it to repair

    Hi, I received phone calls from a guy who says he works for pc24by7, which is something to do with Microsoft apparently. He said that I have errors in my event log (which I do) and THST if its not fixed my pc can fail at any time. To correct what is the cause of the problem, they need to connect to my computer. I asked for a phone number, but he said that I won't get through because they are always beusy call anywhere in the world. Is this legitimate do you think? Someone at - he heard of them? The Web site is www.pc24by7support.com

    Hi, I received phone calls from a guy who says he works for pc24by7, which is something to do with Microsoft apparently. He said that I have errors in my event log (which I do) and THST if its not fixed my pc can fail at any time. To correct what is the cause of the problem, they need to connect to my computer. I asked for a phone number, but he said that I won't get through because they are always beusy call anywhere in the world. Is this legitimate do you think? Someone at - he heard of them? The Web site is www.pc24by7support.com

    Hey jimmygirl73

    It's a SCAM

    Microsoft does not contact you unless you request them

    having nothing to do with people calling you because they are NOT microsoft

    hang up on them

    Walter, the time zone traveller

  • I received a phone call today (a third) saying that my computer has been hacked and that they need to get into my system for necessary repairs

    * O.T. > phone call

    I received a phone call today (a third) saying that my computer has been hacked and that they need to get into my system to make the necessary repairs.   They have stated that they are from Microsoft but I didn't honestly believe that.  Has anyone else had these calls?

    Thousands have and you have reason to be wary.

    Read this

    http://blogs.Microsoft.com/Cybertrust/2014/06/26/is-that-call-from-Microsoft-a-scam/

  • In the case I buy Adobe Acrobat Connect Pro and want to set up a meeting with my students... They need to buy Adobe Connect for virtual classrooms?

    In the case I buy Adobe Acrobat Connect Pro and want to set up a meeting with my students... They need to buy Adobe Connect for virtual classrooms?

    No, they haven't needed to purchase Adobe Acrobat Connect Pro license if they use a room of yours.

  • I bought the plan for photography and still pay each month. but I can't use photoshop only after update. and they need to join a plan. How can I do? I can only use for the trial version even I never tell months.

    I bought the plan for photography 6 months ago and still pay every month.

    but I can't use photoshop only after update. and they need to join a plan.

    How can I do?

    I can only use for the same test version that I pay every month.

    Hi yejik42305752,

    Please see the following article: https://helpx.adobe.com/creative-suite/kb/trial--1-launch.html

    Kind regards

    Tanuj

  • Hi Folks, I'm ready to go with the versions of CC of LR and Psalm I currently use Apple products and the iCloud for storing photos, they stay on the iCloud or do they need to go to a related version CC?  Also, I guess that versions CC of LR

    Hi Folks, I'm ready to go with the versions of CC of LR and Psalm I currently use Apple products and the iCloud for storing photos, they stay on the iCloud or do they need to go to a related version CC?  Also, I guess versions CC of LR are Mac compatible.  Can they go on several devices, the cloud itself, including mobile devices like the iPad?  Thanks a lot in advance, Dave.

    You can have your photos on iCloud without any problem.  Lightroom CC 2015 is compatible with mac, please check system requirements of Lightroom CC 2015. You can install Creative Cloud on 2 machines, however, you can't use both the at the same time, the control 1:1 point: http://wwwimages.adobe.com/content/dam/Adobe/en/legal/servicetou/Software_Terms-en_US-2015 0407_2200.pdf

    You can use Lightroom for mobile or your ipad and iPhone. Please check Adobe Lightroom for mobile FAQ

    I hope this helps.

  • How can I get an AI. file? I did a drawing for a company who would like to use it on a shirt. But they need the file I. I did it with adobe illustrator for ipad.

    How can I get the AI. file? I did a drawing for a company who would like to use it on a shirt. But they need the file I. I did it with adobe illustrator for ipad.

    In Illustrator, Draw, you can send your Illustrator drawing on your desktop. Then save it from there.

    You need Illustrator CC on the desktop to be able to.

  • AS3 getting a random multiple number of table

    Hello:

    I have a hard time finding ways to manage the division with random numbers of tables using AS3.

    On my stage, I have two dynamic boxes; Box1 and box2 and a button, btn.

    in the Assembly, I have the following berries:

    var myDivisor:Array = [3,6,9,12,15,18,21,24,27,30];

    var myDivider:Array = [1,3,6];

    The idea is to divide 1 box per box of 2, so myDivisor should be a random number greater than a random number between myDivider

    WITH THE HELP OF BTN, HOW CAN I GET A RANDOM OF EACH TABLE, SO THIS DIVISOR NUMBER IS HIGHER THAN THE DIVISOR?

    In the timeline for button, here is the code:

    btn.addEventListerner (MouseEvent, CLICK, rNum);

    function rNum (MouseEvent): void

    {

    Box1. Math.Floor (Math.random) * myDivisor.length) / box2. Math.Floor (Math.random) * myDivider.leng th);

    }

    Please suggest ways to make this work.

    German

    var myDivisor:Array = new Array (3,6,9,12,15,18,21,24,27,30,23,89,90,1,34,56,78,99,345,456);
    var myDivider:Array = new Array (1,3,6);
    var divisor: int;
    var divisor: int;

    getNumbers();
    function getNumbers() {}
    divisor = getRandom (myDivisor);
    divisor = getRandom (myDivider);
    checkValues();
    }
    function getRandom(array:Array):int {}

    var NombrAl = Math.floor (Math.random () * array.length);
    return table [NombrAl];

    }
    function checkValues() {}
    If (getRandom (myDivisor) > getRandom (myDivider)) {}
    trace (getRandom (myDivisor));
    trace (getRandom (myDivider));

    } else {}
    getNumbers();
    }
    }

  • KB2604092 KB2656352 KB2656369 KB2686828 KB2604110 and KB2656407 are still they need install

    ORIGINAL TITLE: Windows Update problem

    My laptop that is running Windows XP keeps repeating the need to download and install Net Framework security the following dates KB2604092 KB2656352 KB2656369 KB2686828 KB2604110 and KB2656407. 20 attempts later and they still see that I need to install even if they would supposedly downloaded ok. How can I solve this?

    Woozle,

    See the article after some troubleshooting for your question:

    Windows Update or Microsoft Update repeatedly offers the same update

    http://support.Microsoft.com/kb/910339/en-us >

    Please let us know if it did or did not help to solve your problem.

    UTC/GMT is 21:49 on Wednesday, July 25, 2012

  • c07ft5y, CDDB, ODBC and Mimar Sinan in the register - I was told by a company of 'technical support' that they need to eliminate these because it's malware and viruses

    I called a line of technical support that was supposed to be for prolbems Avast free antivirus software. The tech support person, located in India with a company called Bamgar, has convinced me to give remote access to my computer. Currently, she proceeded to look in my registry and make comments about how my computer had a lot of 'serious problems' and hackers could access sensitive files, I have or look in my online banking because of the above located things on my record that she claimed were malicious software and viruses. I became suspicious when she then proceeds to discuss how his own company, 'Good Karma' would withdraw from all of this for me and to solve all these problems. They would need "only" $ 130 for this. I told him I did not have that kind of money and I want to talk to him later on this subject, because now I was very nervous, she has access to my computer. I clicked the button to put an end to its remote access, but of course I don't know if she still has access to my computer now, as I don't know how to tell for sure.

    I downloaded the free firewall Zone Alarm immediately after the end of that phone call and put it up to block access. I'm also looking for my machine with Spybot Search and Destroy. I know not what else to do to stop this company access to my computer, and I don't know if it was legitimate, and the files she mentioned are really malware. Please tell me if you know what are actually the these points in my registry. Thank you very much.

    Hello

    If you have finished the desktop sharing session, then worry not access your computer.

    I also recommend to run the verification and virus scan online if any malware or virus detected on the computer activity. You can run the scan for viruses online from the link below: http://www.microsoft.com/security/scanner/en-us/default.aspx

    NOTE: Make sure that you select the correct version of the operating system before downloading the scanner)

  • How do you determine the steps to use when they need to change the info in the diaglog box "WINDOWS SECURITY" of win 7, which asks the user and the password?

    My background: I can only see this dialog box titled WINDOWS SECURITY when I want to access my log to router with my office router connection. The dialog box refers specifically to my router, and asking a user and a password.

    A long time ago that I asked to remember and, of course, I forgot it and the location that I wrote. Now I am unable to determine what I thought, would be a simple reset and the steps that allow me to perform a reset. After a series of search phrases on Bing, and in the community of the SP as well as Win 7 Pocket administrator index I can't find the steps because the dialog box, it seems with the title of the WINDOWS SECURITY is too general.

    I need to install a new router and need to change the user and password. I don't know if user and password are unique to the company of router or Microsoft Win 7. Nevertheless, I can reset thinking them they are unique to me and Microsoft because there is no query such as, "you forgot your password?', whereby get you a temporary.  These steps are already stationed in the community and I just can't get into the research phase right? (What is related to IE 11?) Thank you.

    > I need to install a new router and need to change the user and password.

    Do you want to connect to your old router?  If Yes, most routers have built-in switch you tripping with a paper clip or similar to force a reset to the factory settings.  You can then access the default connection.

    If it's the new router, it should be accessible with the factory default login. If you don't know please post that make the exact and the model of the router.

  • I have created a PDF file using Adobe DC and I need to share this amongst many pepole. They need to install adobe DC on their pc

    I have created a PDF file using Adobe DC and I need to share this amongst many pepole. Do need to install adobe DC in their pc.

    It depends on.

    1. most people with reasonably new equipment can read PDF files in any case using things that are built in. This includes

    -Windows 8 and later versions

    -Mac OS (all users)

    -iOS (iPhone, iPad)

    -Android (phones and tablets)

    2. many people Windows have a web browser that can read PDF files anyway. This includes

    -Chrome

    -FireFox

    3. This means there are many different types of software that can read PDF files. If you do a simple PDF, you should be fine. If you make shapes or portfolios or media, your end users must install Acrobat Reader, even if they otherwise can read a PDF file.

  • Tips for using relations containment (if they need to?)

    Hello again,

    Our team recently discussed when use the containment relationships, and we realized that there is room for improvement of our understanding. After reading a lot of the help topics, the main use for the containment relationship seems to be the ability to determine whether an entity is completed. However, as far as we can tell, in our work we yet had a need for the notion of entity-completeness (if we have, it was without the knowledge). Instead, using a containment structure in a data model often seems to complicate things by distancing the Global entities (making it thus seem more difficult to reason multiple instances).

    My best guess, aside from completeness, is that containment relationships are necessary during the mapping of a database structure (for example, Siebel). For example, a template like:

    Global
    -the invoice
    -the line item

    .. interface could more properly with the external data compared to a 'flatter' structures structure such as:

    Global
    -the invoice
    -the line item

    .. .or a relationship (not deducted, not contained) "regular" would be required to connect to their lines of billing invoices. In the latter scenario, the relationship would be perhaps more difficult to determine when data have been mapped on?

    I have a feeling that we might miss something obvious, but I'm curious to know what this community thinks about this matter. Can anyone help, perhaps by providing a list of the advantages / disadvantages of confinement, or perhaps situations in which containment is still necessary?

    Thank you!
    -Patrick

    I have built many rulebases to demo for integration, usually with Siebel so I'll use it as my example. What I learned from this, it's that the integration will be easier if the logical structure of the entities/containment OPA relationships match the logical structure of the Siebel business components.

    For example, if in Siebel, you have something that represents Global (which I will refer a case for this example), and you also several logically below the case business components, for example

    A case can have multiple Contacts
    Each Contact can have multiple incomes
    Each Contact can have several resources
    Each Contact can have several expenses

    I would put in place the following entities/containment relations in OPA:

    Global--> one - to-many--> the household member
    the Member of the household--> one - to-many--> the household income of the participant
    the Member of the household--> one - to-many--> resources of the Member of the household
    the Member of the household--> one - to-many--> cost of the Member of the household

    Note This Contact (Siebel) is the Member of the household (OPA). I could use 'contact' in the OPA, but I prefer to use a name friendly plus-utilisateur of business such as "member of the household" - if they are members of a household in effect, it could also be the person, the taxpayer, etc. or anything that is appropriate for the original material.

    I guess that this general principle applies even if integration is with something other than Siebel.

    See you soon,.
    Jasmine

  • Firefox won't let pages redirect when they need to. How can I stop this?

    When on Web sites, I have always used I have to "allow" for moving from one area to another. I didn't do it before. At the top, it says 'Firefox prevented this redirect page' or 'reload page' and then when I hit allow that it still does not a lot of time. I removed some add-ons because I thought they might be at the origin of this but did not help. Have not been able to find whatever it is under 'options' on my other add-ons that looks like it would interrupt what he does. Help, please!

    There is a setting for that turn on and off. If you don't set yourself, maybe one of your extensions don't? Anyway, please check (UN) here:

    "3-bar" menu button (or tools) > Options > advanced

    In the mini ' General' tab, uncheck "warn me when websites try to redirect or reload the page.

Maybe you are looking for

  • Why is my Apple - Super Drive CD does not connect to my iMac?

    Why is my Apple - Super Drive CD does not connect to my iMac?  That was before I upgraded to el Capitan.  Now it will not allow CD insertion and the icon does not appear on my desktop.  However, the device is displayed in the Finder and seems to rest

  • Graph and node property

    Hello all; I want to do my most powerful .vi, so what I wanted to do are the following: 1. my entry should be: "checkbox system Boolean" table 1 d (it's must have, I need this as input in the function call library node) 2. all these checkbox (12) are

  • Really REALLY need help to sort phone

    Hi, the thing is, I have a laptop, I bought second hand so I don't know the hard drive will have been formatted in this case, it will be able to reinstall windows - the status box, as they say, more I have no backup or any CD XP CD, so I'm totally st

  • How to install BlackBerry App Google play 10OS BlackBerry Services

    Hello Many of these android applications need Services of Google play in the background to run. By using the snap app, it is not possible to install it but I tried with AppShare request also. Although it installed but did not work. How to solve this

  • Boot of of Smartphone blackBerry, watch only flashing red LED...

    I am led into the wall here right now everyone, sorry to make my first post as a report disaster but here goes nothin' ': I bought a "BOLD" on ebay a few weeks ago and everything was fine except for the fact that 2 days after getting it the keyboard