Re: populating a date field with random dates

From: DA Morgan <>
Date: Thu, 10 Jul 2008 15:20:33 -0700
Message-ID: <>

GS wrote:
> I have a table that is populated with data for the month of June, I need
> to add roughly an equal number of rows to the table, but with the dates
> in the month of May.
> I can do an insert into table_a select
> field1,field2..date_field-30..field6 from table_a and that works ok, but
> I'd sooner be able to copy all of the existing rows from June into the
> table with random dates between the first and last days of May.
> Is this easily doable? I did something similar (but not with dates) some
> time back, but I forget which function I used and can't find the sql
> scripts I used.
> thanks

DBMS_CRYPTO.RANDOMINTEGER generating numbers between 1 and 31.

Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington (replace x with u to respond)
Puget Sound Oracle Users Group
Received on Thu Jul 10 2008 - 17:20:33 CDT

Original text of this message