?
Solved

Indexing problem

Posted on 2014-07-20
5
Medium Priority
?
176 Views
Last Modified: 2014-07-20
I am trying to set up a full text search on a table in SQL Server 2008 R2.  My table looks like this
Table.jpgAccording to what I have read I need to create a "unique, single-column, non-nullable index".  When I try to create the index on the FText field everything is grayed out so I cannot do it.

How do I proceed?
0
Comment
Question by:jdthedj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 12

Expert Comment

by:duttcom
ID: 40208194
You have "Allow nulls" checked - making that field nullable and therefore not suitable to be an index.
0
 
LVL 12

Accepted Solution

by:
duttcom earned 2000 total points
ID: 40208197
Also, the single column index means that only one column should be the index. It looks like you have two and are looking at adding a third. Assuming CNum is some sort of unique number then that should be your primary key - the 'unique, single column, not-nullable index'.

You can then add other indexes (which are not primary indexes) separately by going into your table design, right clicking and then choosing one of the other index types (Indexes/keys) from the list. That way you can set different combinations of fields to be included in your unique index (e.g. FName and FYear cannot have the same combination of values in any record) without making those fields primary keys.
0
 
LVL 3

Author Comment

by:jdthedj
ID: 40208209
Thanks for the reply duttcom - In the management studio, when I click on Indexes, the new index option is still grayed out after removal of the allow nulls
0
 
LVL 3

Author Comment

by:jdthedj
ID: 40208210
Sorry - didn't see your 2nd comment.
0
 
LVL 3

Author Closing Comment

by:jdthedj
ID: 40208218
Thanks very much!
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question