Showing posts with label index. Show all posts
Showing posts with label index. Show all posts

Wednesday, March 28, 2012

how to use word and pdf filter in full text search (SQLServer2k5)

where to find and how to use full text search service to index word and pdf documents. please point me to a tutorial or give a step by step instruction. thanks for reading.http://www.codeproject.com/csharp/fulltextsearchingifinters.asp

Monday, March 26, 2012

how to use variable to create index

Hi ,

I would like to create index for a table and that index name must be random generated.

How to do this?

declare @.value varchar(50)

set @.value = rand()

set @.value = @.value + 'index-name'

create index @.value on tablename(variables)

Here it is:

IF OBJECT_ID('T1') IS NOT NULL
DROP TABLE T1;

CREATE TABLE T1(
id int primary key,
[Name] sysname,
code sysname
)
GO

declare @.value varchar(50);
set @.value = rand()
set @.value = @.value + 'index-name'

declare @.cmd sysname;
SET @.cmd = 'CREATE INDEX [' + @.value + '] ON T1([Name])';

EXEC(@.cmd);

Thanks,
Zuomin