September 7, 2005 at 8:55 am
There is a function or Store Procedure that let change the data-type defined for user for other.
For Example:
USER_ID = CHAR (20)
Change USER_ID to CHAR(15) with out use
- sp_droptype or sp_addtype sp
Because this could afect all the Dependants Tables.
Thanks
September 7, 2005 at 9:07 am
What do you want to do exactly?? and why?
September 7, 2005 at 9:11 am
Really we Before define some domains.
One of this domains defined is USER_ID = Char(20)
All the tables in the database was created using this data type.
But actually we need to change this Domain USER_ID = Char(30) because we need fit more data into each field.
September 7, 2005 at 9:13 am
That can't really cause problems... why aren't you just altering the tables?
Also why aren't you using varchar()?
September 7, 2005 at 9:14 am
User defined data-types are not ALTERABLE!! to accomplish what you want you need to create a new type, alter those columns using the old type to use the new and then drop the old type
In my opinion the use of userdefined data-types have more cons than pros and I tend to avoid them!!
Cheers
* Noel
September 7, 2005 at 9:17 am
There are a lot of table actually defined with this data type.
Alter table could not have efects because we are changing all the domain not only one expecific field into one database.
September 7, 2005 at 9:19 am
Sorry I hadn't understood the user defined datatype part. As Noeld said, you have to unlink the UDD, drop it, recreate it and then rebind it the the columns. I'd do without the last part though.
September 7, 2005 at 9:21 am
Carlos scripting the change is maybe the only way around and is not very complicated. There is not such thing as sp_altertype
* Noel
September 7, 2005 at 9:24 am
As Noeld says there is no any store procedure that lets yo make a modifcation into a user-defined data type and should to be tru a Store procedure created.
Thank you all for your help.
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply