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 |
|
toddhd
Yak Posting Veteran
55 Posts |
Posted - 2006-06-13 : 09:37:59
|
| I am writing a stored proc to perform some custom paging through a large amount of records. Part of this includes loading the records into a temporary table. My problem is that the table in question uses a custom data type for one of the columns. The column in question is of prime importance and can't be left out. The sproc checks out just fine, but when I go to execute it, it gives me an error when attempting to create the temp table, saying that it can't find the custom data type. Here is the exact error:Msg 2715, Level 16, State 7, Procedure PPGetAllUsers, Line 26Column or parameter #10: Cannot find data type HVCIDdt.Here is the line in the table create statement that defines that column:[OrgUnitGUID] [HVCIDdt],Which is really just a numeric data type:EXEC dbo.sp_addtype N'HVCIDdt', N'numeric(16, 0)',N'null'I've tried fully qualifying the path to the type, but it still says it can't find it. What do I do?-Todd Davis |
|
|
toddhd
Yak Posting Veteran
55 Posts |
Posted - 2006-06-13 : 09:49:55
|
| Never mind, it looks like I was able to just replace:[OrgUnitGUID] [HVCIDdt],With this:[OrgUnitGUID] [numeric(16, 0)],And that worked. Maybe technically not the best solution, but that custom data type hasn't and isn't going to change, so I think it's ok for now.-Todd Davis |
 |
|
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2006-06-13 : 10:43:12
|
| Temp tables are created in the tempdb database, so the custom datatype probably has to exist in tempdb.You are better off doing what you did.CODO ERGO SUM |
 |
|
|
|
|
|
|
|