Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: adding 1000's new rows?

Re: adding 1000's new rows?

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Tue, 29 Oct 2002 15:01:27 -0000
Message-ID: <apm8aj$cp5$1$8302bc10@news.demon.co.uk>

Look at the dbms_random package.
e.g. (from memory)

dbms_random.string(12,'l') returns random strings 12 characters long in lower case.

dbms_random.value returns numbers between 0 and 1 in a uniform (square) distribution.

create table x as

select rownum                    id,

dbms_random.string(12,'l') small_vc
from

    all_objects
where rownum <= 2000
;

--
Regards

Jonathan Lewis
http://www.jlcomp.demon.co.uk

Next Seminar dates:
(see http://www.jlcomp.demon.co.uk/seminar.html )

____USA__________November 7/9   (Detroit)
____USA__________November 19/21 (Dallas)
____England______November 12/14

The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html





david spaisman wrote in message <3DBEC821.94993490_at_earthlink.net>...

>Hello:
>
>For testing if I have a new tableI need to nkow how to fill each of
some
>columns wit differnt values. The columns could be varchar2 or number
or
>even date defined..
>I see how to add a sequenced identifieer(via a loop) but if there are
>other columns, I need to know how to fill them with data that's
>different.
>While the update statement would provide a means to update all of the
>columns with the same values, I would like to nkow how to fill each
>column --let's say three- with different data . These columns are not
>sequenced generated values.
>
>This is to test the table for select on different values.
>
>Perhaps something with an ascii function but I am not sure how to
code
>it. And there must be some other way but I am not sure how to do
this.
>Does any one have any suggestions or routines to use to accomplish
this
>random filling of three columns with different values?
>
>David
>
Received on Tue Oct 29 2002 - 09:01:27 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US