<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - Query input parameter throws error when refered field is numeric"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=127657">127657</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Query input parameter throws error when refered field is numeric
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>6.3.0.4 release
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Base
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>herman.viaene@edpnet.be
</td>
</tr></table>
<p>
<div>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>