Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Randomize subset of data

jerry8989Dec 15 2009 — edited Dec 15 2009
I have a table that has a date column. I need to take rows with 6 months behind the current day. After selecting these rows I need to take a random sample of 2 or 3 rows. I'm not sure how to get the random porition to work.

This is what I have so far

Select *
from tbl_dates
Where Dt > add_months(CURRENT_DATE, -6)


Any help would be greatly appreciated.
This post has been answered by Frank Kulash on Dec 15 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 12 2010
Added on Dec 15 2009
3 comments
496 views