0

Is it possible to decrease the length of a column in data extension?

When I try to do, I get an error saying this:

The length of an existing Text field cannot be decreased.

Is there any workaround?

NOTE: The column is a primary key in this case.

4
  • Is there currently data inside the Data Extension? Commented Aug 9, 2017 at 14:53
  • I had but I cleared it...still not able to change the length.
    – kuml
    Commented Aug 9, 2017 at 14:56
  • if it is cleared, the easiest way is to delete the existing column and create a new one with the same name and the new length. At that point you can import the data into the DE. Commented Aug 9, 2017 at 14:57
  • I should've mentioned this in my question. The column length I am trying to change. That column is marked as primary and it is being used as audience in several scheduled emails so I can't delete this data extension.
    – kuml
    Commented Aug 9, 2017 at 14:59

1 Answer 1

5

There is no way to directly decrease the size of an existing text field.

The easiest way to handle this is to:

  1. Export the data from your existing DE.
  2. Clear your DE
  3. Delete the existing field
  4. Create a new field with same name and new length
  5. Import the previously exported data from the DE.

If you cannot delete the field (primary key or data relationship), your next option is to create a duplicate DE of that existing one and then use a SQL query to move everything to the new DE.

This does create the issue that you will need to redirect all relationships and interactions to the new DE.

All in all, it is going to be a fairly large amount of effort to ever decrease field sizes - so depending on your need, it may be better to just leave it at a larger size.


EDIT: I think something you could check into is the SOAP API Object DataExtensionField - MaxLength but I get the feeling it won't let you change this through API either.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .