[Solved] Criteria in query
[Solved] Criteria in query
I am new to OpenOffice Base and would like to know how to do the following. I have a database file with a field called "FirstName" and what I want to do is set the criteria in a query to only show First Names that begin with the letter "J". Any help with the syntax would be greatly appreciated.
Last edited by JEROME549 on Sat Apr 07, 2018 12:06 am, edited 1 time in total.
OpenOffice Version 4.1.5 on Windows 10
Re: criteria
Create a query in SQL view:
replace "Table" and "First Name" with the actual names of your table and column.
In any view of a table, query or form there are filter tools where you can enter something like LIKE 'J*'
In the GUI you can use the usual asterisk * as joker. In SQL it is %
Code: Select all
SELECT * FROM "Table" WHERE "First Name" LIKE :Name_Starts_With || '%'
In any view of a table, query or form there are filter tools where you can enter something like LIKE 'J*'
In the GUI you can use the usual asterisk * as joker. In SQL it is %
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Criteria in query
Used the wildcard LIKE ‘J%’ and that solved the problem. Thanks so much for your help.
OpenOffice Version 4.1.5 on Windows 10