DBAsupport.com Forums - Powered by vBulletin
Results 1 to 5 of 5

Thread: retrieve records in disperse way

Hybrid View

  1. #1
    Join Date
    Sep 2006
    Posts
    3

    retrieve records in disperse way

    i am having a records like abcde, i know the way of executing them in ascending/descending,but how to retrieve the records in b,d,a,c like.

    please help me out in this issue

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Use a function from the DBMS_RANDOM package to assign a random integer to each row, then order by that random integer
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  3. #3
    Join Date
    Sep 2006
    Posts
    3
    can u please send that query

  4. #4
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Quote Originally Posted by krishnareddy
    can u please send that query
    Google down again huh?
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  5. #5
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    select c1, c2
    from mytable
    order by dbms_random.value;

    Tamil

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width