Solved

Indexing problem

Posted on 2014-07-20
5
170 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 500 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

Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

Question has a verified solution.

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

In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.

719 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