Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

cannot create a table based on a user-defined data-type

--- Sybase version Adaptive Server Enterprise/15.0.3/EBF 17687 ESD#1.1 RELSE/P/x86_64/Enterprise Linux/ase1503/2681/64-bit/FBO/Thu Aug 20 17:17:06 2009 ---

Hi all,

I have a 'very simple problem' I can sort-out and hope you can help me with it.

I have a user-defined datatype in my database

1> sp_help numericn
2> go
Type_name Storage_type Length Prec Scale Nulls Default_name Rule_name Access_Rule_name Identity 
--------- ------------ ------ ---- ----- ----- ------------ --------- ---------------- ----------
numericn  numericn         17   38    38     1 NULL         NULL      NULL                      0

(1 row affected, return status = 0)

but when I try to create a table based on it, I have a failure

1> create table toto (tata numericn)

2> go

Msg 2715, Level 16, State 2

Server 'MX2931VM', Line 1

Can't find type 'numericn'.

What else should I check to figure out my issue?

Thanks

Simon

Former Member
replied


A newly created ASE will have these:

1> select type, usertype, name from systypes where name like "numeric%"
2> go
type usertype
         name

---- --------
         ---------------------------------------------------------------------------
------------------------
   63       10
         numeric

  108       28
         numericn


(2 rows affected)

Attempting to create user-defined datatype named "numerin" should get an error:

1> sp_addtype numericn, int

2> go

Msg 17302, Level 16, State 1:

Server 'rel1572_bret_sun2', Procedure 'sp_addtype', Line 214:

A type with the specified name already exists.

(return status = 1)

Cheers,

-bret

0 View this answer in context

Helpful Answer

by
Not what you were looking for? View more on this topic or Ask a question