I've never used a user type in SQLS before, and I've been handed some sql code that creates one. Unfortunately the code assumes it doesn't exist, so I added a IF...DROP. But that does not happen...
IF EXISTS
(
SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'dbo.udtt_Total')
)
BEGIN
DROP TYPE udtt_Total
END;
CREATE TYPE [dbo].[udtt_Total] AS TABLE(...
It's complaining the type already exists. So I went into sys_objects and found it:
TT_udtt_Total_7D98A078
Can someone explain what's happened here and how to properly DROP this? There's nothing else in the system with a name remotely like any of this, it doesn't seem to be