Running below TSQL code
EXEC sp_addtype N'type_udt1', N'char (6)', N'null'
EXEC sp_addtype N'type_udt2', N'smallint', N'null'
DECLARE @myTbl TABLE ( myId type_udt1 NOT NULL,
OriginId type_udt2 NOT NULL)
I got the error message:
Server: Msg 2715, Level 16, State 7, Line 9
Column or parameter #1: Cannot find data type type_udt1.
Neither in BOL, nor in MSDN I see a constraint to forbid the use of user defined data type in udf.
Need I to use system data types?
Do you have any suggestion?