Question

J'essaie de convertir une colonne de ntext en nvarchar (MAX), mais il semble qu'une recherche en texte intégral est activée sur celle-ci.

Alter table <table> alter column <column> nvarchar

Ensuite, je vais forcer le texte en lignes

update <table> set <column> = <column> +'' where <column> is not null    

Enfin, il me faudra réactiver la recherche en texte intégral.

Comment faire cela en SQL?

Était-ce utile?

La solution

DROP FULLTEXT INDEX ON mytable.mycolumn;
go
Alter table ... nvarchar(value);
go
ADD FULLTEXT INDEX ON mytable add (mycolumn)

( http://msdn.microsoft.com/en-us/ bibliothèque / ms188359.aspx )

Autres conseils

Cela concerne SQL Server 2005.

Syntaxe à supprimer Index de texte intégral:

ALTER FULLTEXT INDEX SUR [TABLENAME] DROP (NOM DE COLONNE)

- ÉNONCÉ DE LA COLONNE OU PLUS -

Syntaxe à lire Index en texte intégral:

ALTER FULLTEXT INDEX ON [TABLENAME] ajouter (COLUMNNAME)

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top