04-10-2008 12:36 PM
Hi All,
I am having a database table where in I am having a column 'FIELD1'.
My requirement is that I want to add two more fields in the table 'FIELD2' and 'FIELD3'.
I then want to copy all the data in field1 to field2 and field3. then I want to delete the original field1.
for Ex.
lets say FIELD1 = 100.
now I want to add FIELD2 and FIELD3 in the table and make FIELD2 = 100 AND FIELD3 = 100. The FIELD1 will be deleted from table.
Please suggest the methods to do so.
It is urgent.
04-10-2008 12:52 PM
Gaurav,
I don't know of a way to delete a column programatically, and therefore you would need to do that step with a follow up transport.
The code to update field2 and field3 should be pretty straight forward.
Select * from mytable
mytable-FIELD2 = mytable-FIELD3 = mytable-FIELD1.
modify mytable.
endselect.
04-10-2008 12:52 PM
Gaurav,
I don't know of a way to delete a column programatically, and therefore you would need to do that step with a follow up transport.
The code to update field2 and field3 should be pretty straight forward.
Select * from mytable
mytable-FIELD2 = mytable-FIELD3 = mytable-FIELD1.
modify mytable.
endselect.