I'd like to create a fulltext index on several columns which are varchars
and numbers. And there is the problem with the numbers.
Is there really no way to add column as number or decimal for the fulltext index?
I've got for example a table article:
CREATE TABLE article
( articleid number(10) not null,
articlename varchar(50) not null,
articlecode1 varchar(50)
);
CREATE FULLTEXT CATALOG MyCatalog;
CREATE FULLTEXT INDEX ON artikel
(articleid LANGUAGE 0x0,
articlename LANGUAGE 0x0,
articlecode1 LANGUAGE 0x0)
KEY INDEX PK_ARTICLE ON MyCatalog
WITH CHANGE_TRACKING AUTO;
It couldn't be created, because articleid
is a number!
My alternate solution is to create a second column such as articleidtext varchar
as a copy of articleid. Afterward to fill up with a trigger.
Is there really no other way?
I've tried also to Cast like: CAST(articleid AS varchar) LANGUAGE 0x0
it doesn't work either.
any other suggestion??
thx...