3 liens privés
Recherche fulltext avec caractères spéciaux
SELECT * FROM test_tab WHERE ctxsys.catsearch (company_name, '<query><textquery grammar="context">bb%</textquery><query>', NULL)>0;
SELECT * FROM test_tab WHERE company_name like 'BB%';
=> le like a l'air plus rapide
GRANT EXECUTE ON CTXSYS.CTX_DDL TO test;
CREATE TABLE test_tab (company_name VARCHAR2 (60));
INSERT ALL
INTO test_tab VALUES ('CONSULTING')
INTO test_tab VALUES ('LW CONSULTING')
INTO test_tab VALUES ('LW CONSULTING INC')
INTO test_tab VALUES ('LW CONSULTING INC.')
INTO test_tab VALUES ('LW CONSULTING, INC.')
INTO test_tab VALUES ('LW CONSULTING, INC.')
INTO test_tab VALUES ('ORACLE CORPORATION')
SELECT * FROM DUAL;
EXEC CTX_DDL.CREATE_INDEX_SET ('company_set');
CREATE INDEX idx_company ON test_tab (company_name) INDEXTYPE IS CTXSYS.CTXCAT PARAMETERS ('INDEX SET company_set');