I need Exact match of word in search

i used this query of searching name

SELECT “Table”.* FROM “Table”, “Table_filter” WHERE ( ( ( UPPER ( “Table”.“Name” ) LIKE ‘%’ || UPPER ( “Table_filter”.“Name” ) || ‘%’ ) OR ( “Table_filter”.“Name” IS NULL ) )

Example ;- i search Mark it returns Mark, Mark Pop, Rock Mark but i want to search only Name Mark or if i search Rock Mark it should return only Rock Mark.

i tried many option but all not solved my purpose.

Thanks in advance

There’s 1 problem: HSQLDB 1.8 defaults to case-sensitive columns, so even with a correct query you wouldn’t get all Marks.

You have 2 options:

  1. Create a new db, execute SET IGNORECASE TRUE; and make the tables. The official doc doesn’t make it clear whether it’s every single db made on that computer or just the new one you just created. It does say only an Admin can do that.

  2. Re-make the tables and set the Text columns to VARCHAR_IGNORECASE.

This query worked for me after that:

SELECT
    "Table".*
FROM
    "Table",
    "Table_filter"
WHERE
(
    "Table"."Name" LIKE 'Mark'
    AND
    "Table_filter"."Name" LIKE 'Mark'
) OR "Table_filter"."Name" IS NULL
;

I change text VARCHAR to Text CHARACTER

for “Table_filter” ."Name ", “Table”.“Name” . It’s

work good for Exact match of word

Sorry, I spoke too soon, my bad.