Bug 133007 - Cannot create a parameterized query containing spaces
Summary: Cannot create a parameterized query containing spaces
Status: RESOLVED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-13 16:00 UTC by Nick
Modified: 2020-05-14 10:43 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
I am trying to create an query in LibreOffice Base because I have to do my homework. But every time I try to create queries I receive an error. (1.64 MB, video/x-matroska)
2020-05-13 16:00 UTC, Nick
Details
Here you are (6.68 KB, application/vnd.oasis.opendocument.database)
2020-05-13 17:40 UTC, Nick
Details
I cannot open my previous attachment so maybe this one will open (5.23 KB, application/vnd.sun.xml.base)
2020-05-13 17:42 UTC, Nick
Details
test file (6.76 KB, application/vnd.oasis.opendocument.database)
2020-05-13 18:02 UTC, Julien Nabet
Details
parameter query (6.90 KB, application/vnd.oasis.opendocument.database)
2020-05-13 18:30 UTC, Julien Nabet
Details
It doesn't work either (32.68 KB, image/png)
2020-05-13 18:45 UTC, Nick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick 2020-05-13 16:00:47 UTC
Created attachment 160763 [details]
I am trying to create an query in LibreOffice Base because I have to do my homework. But every time I try to create queries I receive an error.

I am trying to create an query in LibreOffice Base because I have to do my homework. But every time I try to create queries I receive an error.
Comment 1 Julien Nabet 2020-05-13 17:22:34 UTC
On which LO version are you?
On which env are you? (Windows, Linux, MacOs)

I wonder if it could be due to Cyrillic characters, 
would it be possible you attach the file so I can test this?
Comment 2 Nick 2020-05-13 17:39:53 UTC
I am on 6.0.7.3. I am using Linux (distro based on Ubuntu 18.04)
Comment 3 Nick 2020-05-13 17:40:47 UTC
Created attachment 160769 [details]
Here you are
Comment 4 Nick 2020-05-13 17:42:21 UTC
Created attachment 160770 [details]
I cannot open my previous attachment so maybe this one will open
Comment 5 Julien Nabet 2020-05-13 18:02:55 UTC
Created attachment 160773 [details]
test file
Comment 6 Julien Nabet 2020-05-13 18:04:30 UTC
On pc Debian x86-64 with master sources updated today, I gave a try but didn't have criterion.

Could you copy paste what you put in criterion?
Comment 7 Nick 2020-05-13 18:10:11 UTC
[Введіть рік видання]
Comment 8 Julien Nabet 2020-05-13 18:30:47 UTC
Created attachment 160775 [details]
parameter query

Would it correspond to what you wanted?
Comment 9 Nick 2020-05-13 18:45:46 UTC
Created attachment 160780 [details]
It doesn't work either
Comment 10 Julien Nabet 2020-05-13 18:48:46 UTC
Ok can't help here.
Uncc myself.
Comment 11 Alex Thurgood 2020-05-14 09:54:48 UTC
I can get this to work with

:Введіть_рік_видання

in SQL query mode (rather than GUI query design)

and it will ask me for the input year.
Comment 12 Alex Thurgood 2020-05-14 10:18:48 UTC
https://wiki.documentfoundation.org/Faq/Base/115
Comment 13 Alex Thurgood 2020-05-14 10:19:54 UTC
(In reply to Alex Thurgood from comment #11)
> I can get this to work with
> 
> :Введіть_рік_видання
> 
> in SQL query mode (rather than GUI query design)
> 
> and it will ask me for the input year.

You can save this, then switch back to GUI Query mode and the query will run, at least for me with

Version: 7.0.0.0.alpha1
Build ID: 6a03b2a54143a9bc0c6d4c7f1...
CPU threads: 8; OS: Mac OS X 10.15.4; UI render: default; VCL: osx; 
Locale: fr-FR (fr_FR.UTF-8); UI: en-US
Calc: threaded
Comment 14 Nick 2020-05-14 10:20:44 UTC
I did the same thing and it works fine now...Thank you for your help. Do you know whether I can create a query which would create new table that would contain those fields I chose. I think it is a make table query.
Comment 15 Alex Thurgood 2020-05-14 10:41:14 UTC
"Parameter names may not contain any of the characters <space>`!"$%^*()+={}[]@'~#<>?/,. They may not be the same as field names or SQL reserved words. They may be the same as aliases."

See for example :
https://help.libreoffice.org/6.2/he/text/shared/explorer/database/02010100.html
Comment 16 Alex Thurgood 2020-05-14 10:43:33 UTC
(In reply to Nick from comment #14)
> I did the same thing and it works fine now...Thank you for your help. Do you
> know whether I can create a query which would create new table that would
> contain those fields I chose. I think it is a make table query.



Reading the HSQLDB documentation (for version 1.8) would be better.