Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Unique index on multiple column primary key (composite) Expand / Collapse
Author
Message
Posted Friday, November 12, 2010 9:36 AM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Monday, January 27, 2014 12:39 AM
Points: 99, Visits: 99
I'm trying to create a Unique Index on composite primary key column(ColA, ColB) for Full Text Indexing. I could create the index, but I'm not able to create a full text index based on that.
Any pointers? Appreciate help. Thanks, Srinivas.
Post #1020047
Posted Friday, November 12, 2010 9:51 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Friday, December 13, 2013 4:35 AM
Points: 386, Visits: 211
What datatype are your two columns.
Can you post the create fulltext index command.



Cursors never.
DTS - only when needed and never to control.
Post #1020064
Posted Friday, November 12, 2010 1:58 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Monday, January 27, 2014 12:39 AM
Points: 99, Visits: 99
Both are integer columns(Item_Id int, Attribute_id int). And I'm trying to create the Full Text Index using SSMS(Management Studio). Unique index was created successfully. Trying to create Full Text Index by using it in SSMS it asks for a unique index. but my index does not show up in the drop down.
Post #1020207
Posted Friday, November 12, 2010 2:04 PM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Friday, June 27, 2014 12:43 PM
Points: 15,444, Visits: 9,596
Per MSDN:
KEY INDEX index_name
Is the name of the unique key index on table_name. The KEY INDEX must be a unique, single-key, non-nullable column. Select the smallest unique key index for the full-text unique key. For the best performance, we recommend an integer data type for the full-text key.


It has to be single-key. That means one column. Can't be compound.


- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread

"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Post #1020211
Posted Friday, November 12, 2010 3:51 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Monday, January 27, 2014 12:39 AM
Points: 99, Visits: 99
I think I got it. I created a dummy Identity column on TableC and used it as an unique index for my Full Text Index. And it works. :)
Post #1020239
Posted Monday, November 15, 2010 6:21 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Friday, June 27, 2014 12:43 PM
Points: 15,444, Visits: 9,596
srinivas-406082 (11/12/2010)
I think I got it. I created a dummy Identity column on TableC and used it as an unique index for my Full Text Index. And it works. :)


Cool biz. Well done.


- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread

"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
Post #1020697
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse