[Libreoffice-bugs] [Bug 127657] New: Query input parameter throws error when refered field is numeric
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Fri Sep 20 07:56:53 UTC 2019
https://bugs.documentfoundation.org/show_bug.cgi?id=127657
Bug ID: 127657
Summary: Query input parameter throws error when refered field
is numeric
Product: LibreOffice
Version: 6.3.0.4 release
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Base
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: herman.viaene at edpnet.be
Table "Gezinnen"
3 columns:
gezinsid primary key autonummer
gezinsnaam varchar
huwelijksdatum date (in english marriage date)
Now I want to make a query with a parameter which should refer to the month of
huwelijksdatum,
the query reads as
select "gezinsnaam", extract(month from "Gezinnen"."huwelijksdatum") from
"Gezinnen";
that works OK
now adding the parameter:
select "gezinsnaam", extract(month from "Gezinnen"."huwelijksdatum") from
"Gezinnen" where extract(month from "Gezinnen"."huwelijksdatum")=:huwmaand;
When I run this, I get the dialogue to ask for the value of huwmaand, but
whatever I tried, just a digit, or # around it as a date or " or ', I always
get "Incorrect type for setString".
I'm at loss as I read in the Firebird FAQ (or whatever it is from Firebird)
that extract(month......) returns a smallint, so where do I go wrong??
I tried to get around this by saving the first select as a query, works OK and
then opening a second query which takes the first as its source, and add the
parameter there, but no success.
BTW: I do this on Win10, but using the the same odb on Linux Mageia 6 or Mageia
7 with the same version of LibreOffice gives the same result.
Casting the month expression to varchar(2) , then the query works.
I couldn't find anything which indicates that input paramaters are limited to
strings, and numeric is not accepted. So I consider this a bug.
--
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/20190920/4a005de2/attachment-0001.html>
More information about the Libreoffice-bugs
mailing list