In the SQL Server 2008 database I have a user-defined data type. In one of stored procs I was going to use that type as a column type of temp table, like:
CREATE TABLE #SomeTable
(
[some_column] UDT_SomeType,
-- other columns
)
Apparently my attempt failed, because, as far as I googled, my UDT_SomeType
does not exist in tempdb
(where temp table is actually stored).
The UDT_SomeType
is actually NUMERIC(19,9)
, so I can use the following workaround for now:
CREATE TABLE #SomeTable
(
[some_column] NUMERIC(19,9),
-- others columns
)
However I don't think it is a really good solution. Is there any kind of best practice which can be applied here?