cancel
Showing results for 
Search instead for 
Did you mean: 

OpenOffice & SQL (Solved)

IanSn
Grafter
Posts: 492
Thanks: 5
Registered: ‎25-09-2011

OpenOffice & SQL (Solved)

Quote
"Parameter queries with placeholders (*, _) or special characters (for example, ?) are not possible."

Anybody use OpenOffice Base?
If so, has anyone found a way to use parameter queries - ie., with variables -  and where you can use * or & ?
eg. 'hypo' will find 'Hypothyroid', or whatever you need, in a search.
Need a search form for medical subjects.
So far have to type in the exact (and case sensitive) text or the query comes up blank.
(Problem is some of these medical subject names are long and a PITA to type!)
I'll need to read up but wonder if anyone has direct experience of this in Open Office.
Is there some SQL to insert directly that will do this, or is the statement above correct - you can't do it?
Had something similar working fine in Access few years ago.
3 REPLIES
VileReynard
All Star
Posts: 11,205
Thanks: 307
Fixes: 11
Registered: ‎01-09-2007

Re: OpenOffice & SQL

Have you considered sqlite?
I don't use OpenOffice - Libreoffice is a bit more solid.
Haven't used the base feature but https://wiki.openoffice.org/wiki/Documentation/How_Tos/Using_SQLite_With_OpenOffice.org
looks interesting.

IanSn
Grafter
Posts: 492
Thanks: 5
Registered: ‎25-09-2011

Re: OpenOffice & SQL

Just grabbed sqlite the other day.
Not very experienced with these things so that will be slow going!
Thanks for the link, I'll be returning to that.
Searching has pulled an avalanche of SQL stuff which is most server oriented and not anything I understand particularly.
Need to go back to the old Access files and see what I did there (forget now), it wasn't difficult. Can't be that different from SQL, and must be some way of setting up a single form to search for a subject that doesn't require being typed exactly!
The quote I posted above seems very odd to me. If true it rules out OO Base as useful in most respects.
(The forum for OpenOffice obvs doesn't have spammer protection or any moderators! Jeeez!!!)
IanSn
Grafter
Posts: 492
Thanks: 5
Registered: ‎25-09-2011

Re: OpenOffice & SQL

OK, solved.
Here it is in case anyone else runs into it -
Needed to set definitions on the text fields on the tables to VARCHAR IGNORECASE
and this in the criterion of my 'subject' column in the query to allow wildcard searches -
LIKE '%' || :param || '%'
Where 'param' has become 'Search_Subject'. (no spaces allowed)
  Happy now!  Smiley
---
Btw, take back what I said about the Apache OpenOffice forum, or at least the Base one, it was fine, and the tech help was excellent.
There was a comment about using sqlite on there, too. I didn't grab it, but along the lines of "not necessary". I wouldn't know...