https://bugs.freedesktop.org/show_bug.cgi?id=57994

          Priority: medium
            Bug ID: 57994
          Assignee: [email protected]
           Summary: SQL: Inconsistent treatment of asterisk wildcard in
                    LIKE
          Severity: normal
    Classification: Unclassified
                OS: Windows (All)
          Reporter: [email protected]
          Hardware: Other
            Status: UNCONFIRMED
           Version: 3.6.3.2 release
         Component: Database
           Product: LibreOffice

Created attachment 71150
  --> https://bugs.freedesktop.org/attachment.cgi?id=71150&action=edit
Database file containing a table with a list of words

In a Select statement, the * wildcard is accepted by the LIKE operator,
matching zero or any characters.  However, in a Delete statement, the * is
treated as an ordinary character by LIKE rather than a wildcard.

The attached database (Asterisk Wildcard.odb) illustrates the problem.  The
table List contains a list of words in the column Name.  The query
select "Name" from "List" where "Name" like 'C*'
returns
Cabbage
Cherry
and the query
select "Name" from "List" where "Name" not like 'C*'
returns all of the words that do not begin with C.

But the statement
delete from "List" where "Name" like 'C*'
does not delete any rows from the table, and the statement
delete from "List" where "Name" not like 'C*'
deletes all of the rows.

Treatment of wildcard characters should be consistent across all statements. 
If % and _ are the only wildcards accepted by Delete, that should also be true
of Select.

(Note: my installation of LibreOffice uses the default database, presumably
HSQL.  I don't know how to verify that that's the case.)

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to