Hello I cant really make this sql workin because error column is not indexed (when i was using just like "=" it was all right) but I need contains for lazy typing purposes. I was searching the net, but the examples are always on so much different concept, than I have here. Can someone make example for this sql, how to make index please? the TextBox1.Text is inserted value of last name by user.
SELECT * FROM v_employees_intr
where CONTAINS(NLSSORT(LAST_CZ, 'NLS_SORT = hungarian_ai'), NLSSORT('%" + TextBox1.Text + "%', 'NLS_SORT = hungarian_ai'))>0
ORDER BY " + RadioButtonList1.SelectedValue.ToString() + " ASC"
How to create a Text index? I tried to
CREATE INDEX myindex ON docs(text) INDEXTYPE IS CTXSYS.CONTEXT
Because Oracle web site says it is basic for contains(). But this error message pop out ORA-02158: invalid CREATE INDEX option. So I tried to add the ; on end like IS CTXSYS.CONTEXT; and there then goes ORA-00911: invalid character error. Please can someone help me create index for my query?
You should try with:
CREATE INDEX myindex ON v_employees_intr(LAST_CZ) INDEXTYPE IS CTXSYS.CONTEXT;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With