I am working with local cemetery to digitize there information. I have created a table that contains first, middle, last. dob. dod, section, and plot number.
i want to be able to query information by section but only the section i want. in another database i use to use something like " =[ section] " and when the query ran a dialog box would pop up and you would type "section 1" and the list of section 1 info is all you would get.
any help would be greatly appreciated
Randy
it has been along time since I have messed with any of this
[Solved] Simple query question
[Solved] Simple query question
Last edited by Hagar Delest on Tue Mar 07, 2017 11:00 pm, edited 1 time in total.
Reason: tagged [Solved].
Reason: tagged [Solved].
newbie OpenOffice 3.1 on Windows10
Re: simple query question
Welcome to the OpenOffice / LibreOffice Base forum.
Based ( pun intended ) on the limited information you gave . . . you can use the following Query to return a result set with a Pop-Up that will allow you to enter the search criteria you want.
Explanation:
Sliderule
Thanks to add [Solved] in your 1st post Subject (edit button top right) if this issue has been resolved.
Based ( pun intended ) on the limited information you gave . . . you can use the following Query to return a result set with a Pop-Up that will allow you to enter the search criteria you want.
Code: Select all
Select
"MY_TABLE".*
From "MY_TABLE"
Where "section" = :Enter_Section_Desired
- You will have to change the name of the table I entered above ( "MY_TABLE" ) to the exact table name you have defined. AND, the TABLE NAME must match by case ( CASE: UPPER, Mixed, lower ) exactly, since, "MY_TABLE" is not the same as "My_Table" nor "my_table" .
- You will have to change "section" to the exact name you have defined in your table.
- Use of the :Enter_Section_Desired clause indicated the characters displayed to the user, and, whatever the user enters, must match exactly the data content in the column. That is the database will return all records that match the criteria the user defined.
Sliderule
Thanks to add [Solved] in your 1st post Subject (edit button top right) if this issue has been resolved.
Re: simple query question
does all that go in the criterion field of the query?
newbie OpenOffice 3.1 on Windows10
Re: simple query question
According to your post, you are using OpenOffice 3.1, that is an extremely old version. The current version is OpenOffice 4.1.3 . Please upgrade to the current version, or, correct your forum user profile.
Sliderule
Thanks to add [Solved] in your 1st post Subject (edit button top right) if this issue has been resolved.
- If you are creating the Query using the code I gave you above, you can copy and paste it, after:
- Start your OpenOffice / LibreOffice Base file ( *.odb )
- Click on Queries icon on the left
- Under Tasks, click on: Create Query in SQL View...
- Copy and paste the code
- To run the Query, Press the F5 key, OR click on the Run Query (F5) icon
- If you want to enter it using the GUI ( Graphic User Interface ), on the Criterion line, under the column in question, enter :Enter_Section_Desired
Sliderule
Thanks to add [Solved] in your 1st post Subject (edit button top right) if this issue has been resolved.