Rename column without dropping column? | Community
Skip to main content
New Participant
July 17, 2024
Solved

Rename column without dropping column?

  • July 17, 2024
  • 2 replies
  • 930 views

I need to change this:

<attribute label="Email 2.Informativo" name="EMAILRELACIONALALERTAS" type="string"/>
to:

<attribute label="Email 2.Informativo" name="EMAILINFORMATIVO" type="string"/>

But  changing the "name" attribute and ACC wants to drop the whole column. ACC creates this SQL:


-- Log: Updating table 'NmsRecipient'
ALTER TABLE NmsRecipient
ADD COLUMN sEMAILINFORMATIVO VARCHAR(255),
ADD COLUMN sTELEFMOVILINFORMATIVO VARCHAR(255);
ANALYZE NmsRecipient;
ALTER TABLE NmsRecipient
DROP COLUMN semailrelacionalalertas,
DROP COLUMN stelefmovilmarketing;

I only need to change column name...

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by _Manoj_Kumar_

Hello @god_prophet  I would suggest you to create the new column and the duplicate the data using combination of query and update data activity.

Once the data is in the new column then you can remove the old column.

2 replies

Amine_Abedour
New Participant
July 19, 2024

Hello @god_prophet,

 

You can force the colomn sql name to the old sql name so that Adobe does not try to drop and recreate it like this :

 

<attribute label="Email 2.Informativo" name="EMAILINFORMATIVO" sqlname="semailrelacionalalertas" type="string"/>

 

 

Br,

 

Amine ABEDOUR
_Manoj_Kumar_
_Manoj_Kumar_Accepted solution
New Participant
July 17, 2024

Hello @god_prophet  I would suggest you to create the new column and the duplicate the data using combination of query and update data activity.

Once the data is in the new column then you can remove the old column.

     Manoj     Find me on LinkedIn