[Libreoffice-bugs] [Bug 130595] FIREBIRD (internal): Parameter query with :parameter IS NULL doesn't work

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Wed Feb 12 15:49:52 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=130595

--- Comment #5 from Robert Großkopf <robert at familiegrosskopf.de> ---
Have tested a little bit more:

SELECT * FROM "Table1" WHERE "Name" = :name OR :name IS NULL

must be changed to

SELECT * FROM "Table1" WHERE "Name" = :name OR CAST( :name AS VARCHAR ( 20 ) )
IS NULL

and it will work. You have to set a parameter to the fieldtype of the field
"Name". So if it should work with an INTEGER-field you have to change to
INTEGER here. But: The casting of the parameter isn't needed, because this part
of the query only want to know, if the parameter is without value (NULL).

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200212/604cfd99/attachment.htm>


More information about the Libreoffice-bugs mailing list