Home » SQL & PL/SQL » SQL & PL/SQL » Update code in a table from values of other table (Merged)
Update code in a table from values of other table (Merged) [message #215631] Tue, 23 January 2007 05:17 Go to next message
papu
Messages: 27
Registered: March 2005
Location: Dhaka
Junior Member

hello all
pls see the attached file

  • Attachment: Orafaq.txt
    (Size: 1.18KB, Downloaded 129 times)

[Updated on: Tue, 23 January 2007 05:38]

Report message to a moderator

Re: update code in a table from values of other table [message #215633 is a reply to message #215631] Tue, 23 January 2007 05:20 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Regarding your example, you don't have to do anything.
update code in a table from values of other table [message #215655 is a reply to message #215631] Tue, 23 January 2007 06:20 Go to previous messageGo to next message
papu
Messages: 27
Registered: March 2005
Location: Dhaka
Junior Member

hello all
pls see the attached file
  • Attachment: Orafaq.txt
    (Size: 1.18KB, Downloaded 108 times)
Re: update code in a table from values of other table [message #215667 is a reply to message #215655] Tue, 23 January 2007 07:39 Go to previous messageGo to next message
ab_trivedi
Messages: 460
Registered: August 2006
Location: Pune, India
Senior Member
hi
Please elaborate your question.
Ashu
Re: update code in a table from values of other table [message #215671 is a reply to message #215667] Tue, 23 January 2007 07:55 Go to previous message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Did you mean something like this?
UPDATE LAST_ID2 l2 SET
  l2.max_code = (SELECT LPAD(TO_NUMBER(l2.max_code) + 
                             TO_NUMBER(SUBSTR(l1.max_code, 8, 5)), 12, '0'
                            )
                 FROM LAST_ID l1
                 WHERE l1.group_id = l2.group_id
                );
Previous Topic: Convert Numbers into Words using PL/SQL.
Next Topic: Database transfer
Goto Forum:
  


Current Time: Fri Dec 09 09:47:39 CST 2016

Total time taken to generate the page: 0.28409 seconds