Hi,
I want to change the length of an attribute of a custom type. What is the best way practice? I want to enforce it.
Please share your knowledge and experience.
Thanks.
ta
If there are Accepted Answers, those will be shown by default. You can switch to 'All Replies' by selecting the tab below.
What version of DA are you using and what errors do you get?
If you need to shorten an attribute, you basically have to do a "swap". This entails:
You can lengthen the attribute using DA. Goto object types and increase length accordingly.
DA does not support shortening length of attribute.
Thanks Johnny.
So do you mean no way one can shorten the length of an attribute? I tried using DA as well as using Composer, but I could not. I think there should be a way using DQL.
No, shortening the length of String attribute is not supported (it can only be increased).
We are using DA 6.7. When I triy to shorten the length of the attribute "vendor_nbr" from 12 to 10, I am getting the following error:
Error
We're sorry, there was a problem with your request.
[DM_QUERY_E_MODIFY_ATTR_LEN]error:"ALTER TYPE: The attribute vendor_nbr is longer (12) than the specified length 10."
It looks like it is not easy to shorten the length of an attribute, even with DQL like ALTER....I understand the "swap" method you proposed. I did this in the past, but I need to play with data.
I thought you had problems lengthening an attribute - hence my question about version of DA. For shortening, only the swap works.