Re: populating a database..
Date: Mon, 21 Jun 1999 13:12:54 GMT
Message-ID: <7kldod$9q1$1_at_nnrp1.deja.com>
The best way I can figure out is through SQL*Loader. You could create a file like this, named, say, file.ctl, with random data, from a batch script, or Perl, or the language of your choice:
LOAD DATA
INFILE *
INSERT INTO TABLE A
FIELDS TERMINATED BY ';' OPTIONALLY ENCLOSED BY '"' (NUMBER,NAME,DATE)
"001";"PIMENTA";"06-Jan-1973"
"002";"FRANCIS";"02-Jun-1999"
...
(without the dash lines)
and, from DOS, do a
C:> sqlldr control=file.ctl userid=<user>/<passwd>.
Boa sorte,
Eduardo Pimenta.
In article <376B0C09.D7000EF6_at_mail.lci.ufrj.br>,
Francis <francis_at_mail.lci.ufrj.br> wrote:
> Please, i need some help!
> I have to populate an empty database with 1000 tuples
> which have to be generated automatically .
> example:
> Table A (number, name , date )
>
> is empty and i have to randomly generate data for this writing
> some script(I dont know how) .
> how i write a script to generate randomly data as number, string,
> date,..
> and insert these 1000 tuples into my database in once?
>
> im using personal oracle
>
> Thank you for helping me...
> Francis
> f_spiegel_at_hotmail.com
>
>
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Mon Jun 21 1999 - 15:12:54 CEST