Solved

Indexing problem

Posted on 2014-07-20
5
159 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
  • 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Virtual SQL Server 2014 Standard 35 91
sql server query 12 25
changing page verifacation 1 27
Get Next number from Stored Procedure 8 22
Having an SQL database can be a big investment for a small company. Hardware, setup and of course, the price of software all add up to a big bill that some companies may not be able to absorb.  Luckily, there is a free version SQL Express, but does …
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

860 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