Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
User-Defined Data Type
Message
De
30/07/2006 10:54:55
 
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Divers
Thread ID:
01141546
Message ID:
01141614
Vues:
18
>Perfect, thanks!

No problem, Kevin ... glad I could help. =)

~~Bonnie


>
>
>
>
>>Kevin,
>>
>>Try something a little different ... here's how we do it:
>>
>>IF NOT EXISTS(SELECT * FROM systypes WHERE name LIKE 'udt_fdid')
>>EXEC sp_addtype udt_fdid, 'CHAR(5)', 'NULL'
>>
>>
>>~~Bonnie
>>
>>
>>>I'm trying to write a small proc to create data types. The OBJECT_ID is
>>>returning NULL even though the id exists. What am I doing wrong here?
>>>
>>>
>>>USE db_bmdata
>>>GO
>>>IF OBJECT_ID ('SSN') IS NOT NULL
>>>  BEGIN
>>>    DROP TYPE SSN
>>>  END
>>>
>>>GO
>>>
>>>CREATE TYPE SSN	FROM VARCHAR(11) NOT NULL
>>>
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform