Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
DB Engine
SQL ServerMSDESQL Server CE
Services
Analysis (Data Mining)Analysis (OLAP)DTSIntegration ServicesNotification ServicesReporting Services
Programming
CLRConnectivitySQLXML
Other Technologies
ClusteringEnglish QueryFull-Text SearchReplicationService Broker
General
Data WarehousingPerformanceSecuritySetupSQL Server ToolsOther SQL Server Topics
DirectoryUser Groups
Related Topics
MS AccessOther DB ProductsMS Server Products.NET DevelopmentVB DevelopmentJava DevelopmentMore Topics ...

SQL Server Forum / Other Technologies / Full-Text Search / October 2007

Tip: Looking for answers? Try searching our database.

Newbie question: unique index across nvarchar fields

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Rémi - 26 Oct 2007 13:38 GMT
Surely an easy question for those in the know...

I have a contacts table, and I'd like to ensure uniqueness across
first/middle/last name fields.  Each field is an nvarchar(255) - as
such, I can't create a regular index because the combined index size
is greater than 900 bytes.  I've briefly looked into Full-Text
indexing, but it seems to me that it's primarily for searching, and I
can't see how I can use it to enforce uniqueness.

Can I setup a full-text index to enforce uniqueness?  Do I need to
enforce this constraint in the app instead of the database?

Thanks for any tips.

Remi.
Hilary Cotter - 26 Oct 2007 15:52 GMT
You could where you would do a check to see if the combination field exists
and if not enter it. You will probably find that plain old non-clustered
indexes will work better here, or even an indexed view. With SQL 2005 use
the include option when creating your indexes.

Signature

RelevantNoise.com - dedicated to mining blogs for business intelligence.

Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html

Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com

> Surely an easy question for those in the know...
>
[quoted text clipped - 11 lines]
>
> Remi.
Rémi - 28 Oct 2007 18:04 GMT
Thanks for the tip.

Found information on including non-key columns in non-clustered
indexes in books online; methinks this is what I was looking for.

Remi.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.