Home » SQL & PL/SQL » SQL & PL/SQL » migration script needed (oracle 10g)
migration script needed [message #419678] Tue, 25 August 2009 02:15 Go to next message
rajasekhar857
Messages: 500
Registered: December 2008
Senior Member
hi iam having two tables.
Desc emrpreprinteditemslkup
                                                                                                                                                                                        

PRE_PRINTED_ITEMS_ID            NUMBER(20)                                                                                                                                                                                    
PRE_PRINTED_ITEMS_NAME          VARCHAR2(50)                                                                                                                                                                                  
PRE_PRINTED_MATERIAL_NAME       VARCHAR2(50)                                                                                                                                                                                  
GROUP_ID                                NUMBER(20)                                                                                                                                                                                    
FILE_NAME                               VARCHAR2(100)                                                                                                                                                                                 
PRE_PRINTED_ITEM_STATUS                 NUMBER(1)                                                                                                                                                                                     
FILE_PATH                               VARCHAR2(500)                                                                                                                                                                                 
PRE_PRINTED_MATERIAL_ID                 NUMBER(20)                                                                                                                                                                                    

8 rows selected

DESC  emrpreprintedmaterilaslkup
                                                                                                                                                                                        

PRE_PRINTED_MATERIAL_ID                 NUMBER(20)                                                                                                                                                                                    
PRE_PRINTED_MATERIAL_NAME               VARCHAR2(50)                                                                                                                                                                                  
GROUP_ID                                NUMBER(20)                                                                                                                                                                                    
PRE_PRINTED_MATERIAL_STATUS             NUMBER(1)                                                                                                                                                                                     

4 rows selected






now i want to migrate the PRE_PRINTED_MATERIAL_ID values from table B to table A based on group_id and PRE_PRINTED_MATERIAL_NAME.if both column values matches from both tables then corresponding PRE_PRINTED_MATERIAL_ID from table B to be inserted in Table A.please help me hoe to do this.

[Updated on: Tue, 25 August 2009 02:17]

Report message to a moderator

Re: migration script needed [message #419713 is a reply to message #419678] Tue, 25 August 2009 05:14 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
Before pasting your SQL Plus session here
SET LINESIZE 80

Quote:
...from table B to table A...


Where is your table A and B?

regards,
Delna
Re: migration script needed [message #419714 is a reply to message #419713] Tue, 25 August 2009 05:21 Go to previous messageGo to next message
rajasekhar857
Messages: 500
Registered: December 2008
Senior Member
hi this working anyway thanks
Re: migration script needed [message #419720 is a reply to message #419714] Tue, 25 August 2009 05:40 Go to previous message
Michel Cadot
Messages: 64103
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Next time try it BEFORE posting.
And keep your lines in 80 character width.
Use the "Preview Message" button to verify.
Also always post your Oracle version with 4 decimals.

Regards
Michel
Previous Topic: ORA00604: error occurred at recursive SQL Level 1 ORA01400: can not insert null in to (sys,obj$,name
Next Topic: duplicate problem fix
Goto Forum:
  


Current Time: Sun Dec 04 19:10:58 CST 2016

Total time taken to generate the page: 0.04714 seconds