Home » SQL & PL/SQL » SQL & PL/SQL » creating procedure to move data from one table to other in modified format
creating procedure to move data from one table to other in modified format [message #293805] Tue, 15 January 2008 02:27 Go to next message
gauravsunil
Messages: 68
Registered: August 2007
Location: bhubaneswar
Member
Hi Experts,
I am facing a problem..
I have a table..i m giving the format...
CREATE TABLE "CMSUSER"."TEST1" 
   (X NUMBER(10), 
	Y NUMBER(10), 
	Z VARCHAR2(20 )
   ) ;
 


data in it are..
select * from test1;
X      Y        Z
1	1	50,100,80
2	6	500,1005,803


I have to insert these value into other table with this modification in column Z by a procedure so that data in the new table should be like..
select * from test2;
X      Y      Z
1	1	50
1	1	100
1	1	80
6	500	500
6	500	1005
6	500	803



please help in creating the procedure for it..

Thanks in advance..
Thanks and regards
gaurav
Re: creating procedure to move data from one table to other in modified format [message #293806 is a reply to message #293805] Tue, 15 January 2008 02:34 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Use INSR and SUBSTR.
Join with:
SQL> select level from dual connect by level <= 3;
     LEVEL
----------
         1
         2
         3

3 rows selected.

Regards
Michel
Previous Topic: Array/In Ref Curosr
Next Topic: Error
Goto Forum:
  


Current Time: Sun Dec 04 20:45:07 CST 2016

Total time taken to generate the page: 0.08109 seconds