Home » SQL & PL/SQL » SQL & PL/SQL » insert two records
insert two records [message #199992] Fri, 27 October 2006 05:47 Go to next message
oracle_coorgi
Messages: 185
Registered: September 2006
Location: INDIA-karnataka
Senior Member
hi

how can i insert two record and change the value
eg i have 500 records

col1 col2
abc 101
def 201
ghi 301
till 500 records
i need to insert
col1 col2
abc 101
abc 102
abc 103
def 201
def 202
def 203
ghi 301
ghi 302
ghi 303

thanxs
Re: insert two records [message #199999 is a reply to message #199992] Fri, 27 October 2006 06:16 Go to previous messageGo to next message
vamsi kasina
Messages: 2107
Registered: October 2003
Location: Riyadh, Saudi Arabia
Senior Member
Have you tried it yourself?
If so, Please provide all the scripts (creating table and insert the values).

By
Vamsi.
Re: insert two records [message #200024 is a reply to message #199992] Fri, 27 October 2006 08:00 Go to previous messageGo to next message
joy_division
Messages: 4644
Registered: February 2005
Location: East Coast USA
Senior Member
oracle_coorgi wrote on Fri, 27 October 2006 06:47
hi

how can i insert two record and change the value



What does that mean?
Re: insert two records [message #200035 is a reply to message #200024] Fri, 27 October 2006 09:46 Go to previous message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
I think the OP is looking for a row generator. If I understand, he needs 3 records for each original one:
301 becomes:

301
302
303

501 becomes

501
502
503

etc....

Search for row generators on the wiki pages here or you could search the board. Plenty of examples.

MHE
Previous Topic: chekcing the length of a LONG field
Next Topic: PL/SQL Dynamic Injection
Goto Forum:
  


Current Time: Sat Dec 10 08:51:45 CST 2016

Total time taken to generate the page: 0.13014 seconds