Home » SQL & PL/SQL » SQL & PL/SQL » Creating a new table based on the info from old table
Creating a new table based on the info from old table [message #36060] Thu, 01 November 2001 17:38 Go to next message
Mahesh
Messages: 90
Registered: January 2001
Member
I am in the process of recreating a new table from the existing old table. Except, I have to merge two fields (memo1 and memo2 from the old table) into one field (memo field new table). It will be just a concatenated field of memo1 and memo2. There are storage parameters, constraint issues, pre and post row triggers on the old table. I would like to keep all the settings the same and migrate the data into the new table with one less column. Please tell me the quickest way to accomplish the task.

Has any one done this sort of thing? Please help

----------------------------------------------------------------------
Re: Creating a new table based on the info from old table [message #36071 is a reply to message #36060] Fri, 02 November 2001 06:58 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
create table new_table
as select pk_column, substr(memo1 || memo2, 1, 4000) memo from old_table;

----------------------------------------------------------------------
Previous Topic: Re: creating a view within a function
Next Topic: Re: creating a view within a function
Goto Forum:
  


Current Time: Mon Oct 26 14:52:59 CDT 2020