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.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 setting text field to hold unique values

Author  Topic 

chibis
Starting Member

1 Post

Posted - 2009-04-08 : 15:57:00
Hello everybody
I have a text field which should allow only unique values. I don't want to make it varchar, since I don't know the length of the values. To make things worse, it must be case sensetive. So that 'aids' and 'aids' is not allowed, but 'AIDS' and 'aids' is

Is there any way to acomplish this.

Thank you.

dsindo
Starting Member

45 Posts

Posted - 2009-04-21 : 21:18:20
just add a New field set it as binary populate it with then set as primary key.

select cast('aids' as binary)
select cast('AID' as binary)

0x616964730000000000000000000000000000000000000000000000000000
0x414944000000000000000000000000000000000000000000000000000000



Go to Top of Page
   

- Advertisement -