data generator random functions and dates

I must be missing something. I'm trying to generate data in a date column and am using the 'random' function. I can get it to create the dates, but can't seem to get it to be bounded by the min/max.

After looking in the documentation, the forumns and some experimentation, I surrender. Is what I'm trying to do possible?

if I use the random function such as:

"random(01/01/2006,12/31/2006)" or 01/01/06, etc.

I get values like:

to_date('30-12-2850 12:40:53', 'dd-mm-yyyy hh24:mi:ss')

in the generated data. Any other format or attempting to specify a date format, I get bogus results usually something like 12-30-1899 or something that translates into a number (using date format) like 20060512 without the to_date function wrapping the value.

I'm on PL/SQL Developer Version 7.0.2.1076.

Any help would be appreciated!

Steve
 
I've had the very same issue. I would like to be able to use time as well. E.g.

Code:
[Record]
Name=START_DT
Type=DATE
Data=random(01-01-2006 09:00..01-01-2007 18:00)
 
Both date and time should work. I noticed that date might depend on the format, can you try as d/m/y like this:

random(01/01/2006,31/12/2006)
 
No luck :(

a small test with 'random(01/01/2006,31/12/2006)' produced:

insert into TMX2REP.DLYTRAFFIC_HOUR (TRAN_DT)
values (29361129);

insert into TMX2REP.DLYTRAFFIC_HOUR (TRAN_DT)
values (25891120);

insert into TMX2REP.DLYTRAFFIC_HOUR (TRAN_DT)
values (29931229);

insert into TMX2REP.DLYTRAFFIC_HOUR (TRAN_DT)
values (22731207);

insert into TMX2REP.DLYTRAFFIC_HOUR (TRAN_DT)
values (27470825);

insert into TMX2REP.DLYTRAFFIC_HOUR (TRAN_DT)
values (29520331);

insert into TMX2REP.DLYTRAFFIC_HOUR (TRAN_DT)
values (30750429);

I've tried matching date formats to my current NLS settings (default oracle) and using the date format field... all results are just numeric or the form in the earlier post. I've worked around it in the project I needed it for, but possibly bugs?
 
Marco,

could you please also add/improve following

- ability to stop generation (when it is running)
- ability to generate 0 or more child records (if I use 0..1, I always get 1 child record for each parent one)
 
Back
Top