Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
DMP
Starting Member
41 Posts |
Posted - 2006-01-31 : 08:13:12
|
| Hi,When ever I use an UDT in CAST or Convert Function,I am getting Error Message "udtNumeric is not a defined system type."How can I use an UDT in Cast/Convert function ?regards, |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2006-01-31 : 11:42:44
|
According to BOL in regards to CAST and CONVERT:data_typeIs the target system-supplied data type, including bigint and sql_variant. User-defined data types cannot be used. For more information about available data types, see Data Types. I tend to avoid UDTs, but others might have a better suggestion on how to deal with them.I did find this quote: "User defined Data Types should not be used !"(http://www.akadia.com/services/sqlsrv_programming.html)Cheers! |
 |
|
|
blindman
Master Smack Fu Yak Hacker
2365 Posts |
Posted - 2006-01-31 : 13:08:06
|
| UDTs are practically worthless, IMHO. If they used true inheritance, allowing you to modify the UDT and have the change cascade through all existing implementations, that would be useful. But they don't. It is merely a short-hand crutch when creating the initial database. Try scripting out a table that you created with a UDT. Done? OK, now, is the UDT in the script? Point made... |
 |
|
|
DMP
Starting Member
41 Posts |
Posted - 2006-02-01 : 00:01:48
|
| Thanks... |
 |
|
|
|
|
|