このページはEtoJ逐語翻訳フィルタによって翻訳生成されました。

翻訳前ページへ


Queries- first look, for Libre Office Database Tutorials. Fit for Open Office, too AUTHOR'S MAIN SITE   > > > > >   TABLE OF CONTENTS for 見解/翻訳/版 2 Libre Office / Open Office database "Base" tutorials.

Queries- a first look
Libre Office Base Tutorial. Also valid for Open Office Base

Page URL: fdb1query1.htm

You may find that the database 含むd in LibreOffice / OpenOffice delights you as much as it has me. This page tries to help you use it.

Remember that Libre Office, 含むing its Base, is 解放する/自由な. Don't let that fool you, though. Big organizations, 政治の and 非軍事の, have 可決する・採択するd it as their 基準 office 控訴... and saving million$, but still Getting The 職業 Done. And making things 平易な for 使用者s on different 壇・綱領・公約s... Linux, Mac, Windows all spoken here!

There's more about Base in the main 索引 to this 構成要素..

This page is "browser friendly". Make your browser window as wide as you want it. The text will flow nicely for you. It is easier to read in a 狭くする window. With most browsers, 圧力(をかける)ing 加える, minus or 無 while the 支配(する)/統制する 重要な (ctrl) is held 負かす/撃墜する will change the texts size. (大きくする, 減ずる, 回復する to default, それぞれ.) (This is fully explained, and there are more tips, at my 力/強力にする Browsing page.)

Page contents © TK Boyd, Sheepdog ソフトウェア, 3/06-10/20.

精密検査するd 25 Oct 20 to be 権利 for LibreOffice Base using embedded Firebird. (Do switch to Firebird, when and as you can!) Not every graphic was updated.



The 計画(する) _______________

In this tutorial, we're going to see queries in 活動/戦闘. At the level of this tutorial, you may be left wondering why you would want to bother with a query. The things we are going to do are very simple, and can be 遂行するd other ways. However, queries are very powerful, and once you can "walk", there are things you can do "at a run" that are very useful. (And hard to do other ways.)

The tutorial will use the (米)棚上げする/(英)提議する with 指名する, 演説(する)/住所 and phone number fields 用意が出来ている during the introductory tutorial on (米)棚上げする/(英)提議する 創造.

I 示唆するd that you save that database as FDB004. Leave your earlier work alone... make a COPY of the .odb とじ込み/提出する, create a new folder for this 演習 called "fdb1query1", and paste the .odb とじ込み/提出する into the new folder.

改名する the とじ込み/提出する FDB004-ForQuery1.odb

If the (米)棚上げする/(英)提議する doesn't already have some 記録,記録的な/記録するs, you will need to fill some imaginary (or real!) data into the (米)棚上げする/(英)提議する. This can be done 直接/まっすぐに, or you can use one of the forms developed in the "Simple Form" tutorial.

Queries 過程 the data in (米)棚上げする/(英)提議するs. Every database will have at least one (米)棚上げする/(英)提議する, some with have many. (米)棚上げする/(英)提議するs are the 必須の 創立/基礎 of any database. As your 技術s 改善する, you will probably use the (米)棚上げする/(英)提議するs 直接/まっすぐに いっそう少なく and いっそう少なく... but that doesn't change their 根底となる importance.

A query is a 始める,決める of 支配するs for fetching (警察などへの)密告,告訴(状) from a (米)棚上げする/(英)提議する, or from several (米)棚上げする/(英)提議するs at once. The result of a query is itself a (米)棚上げする/(英)提議するs. It consists of a 始める,決める of 記録,記録的な/記録するs, 組織するd in 列/漕ぐ/騒動s (one per 記録,記録的な/記録する) of columns (one per field). Usually, the query result (米)棚上げする/(英)提議する is unlike the database's other (米)棚上げする/(英)提議するs in that you don't keep it for very long. If you use your operating system's copy/ paste 施設, you might think of the (米)棚上げする/(英)提議するs arising from queries as 存在 the same sort of stuff as things that reside 簡潔に on your system clipboard from time to time.

In this tutorial, we are going to develop two queries. The first will be useful for creating phone number 名簿(に載せる)/表(にあげる)s from the database. The second will 名簿(に載せる)/表(にあげる) people によれば what 明言する/公表する they live in. (The later might be useful, if, say, you lived in New York, but were planning a trip to California and didn't want to overlook any friends living there.

報告(する)/憶測s are another way to create such 名簿(に載せる)/表(にあげる)s, but they come with extra 強制s to match their extra 力/強力にするs. Queries are perhaps more 一般に useful, and you should master them in any 事例/患者. You should master 報告(する)/憶測s, too, 結局, but I think queries should come first. For one thing, a 報告(する)/憶測 can be based on a query... if you know how to make the query for the 報告(する)/憶測!

Just before we start, let me 強調する something that is hinted at in the above: In database work, you need to master (米)棚上げする/(英)提議するs, forms, queries and 報告(する)/憶測s. They are the four "cornerstones" of database literacy.


遂行する/発効させるing the 計画(する)- Phone numbers 名簿(に載せる)/表(にあげる) ____________

Open the copy you've made of the database of 指名するs, 演説(する)/住所s and phone numbers.

In 新規加入 to 記録,記録的な/記録するs it already has, you may need to 追加する some more now. We need at least one each with "AZ", "CA", and "WY" in for "StateOrProvince".

We also want a few 記録,記録的な/記録するs with "1" in the PhonePriority field, and at least one each with 2, 4 and 6 there.

Get yourself to the 事業/計画(する) 経営者/支配人 window. That's the one with three main panes: Database, 仕事s, and a third, probably labeled "Forms" at the moment. If the third pane does not say "Forms" at the moment, then in the pane labeled "Database" (left column) click on "Queries", and the "Queries" pane should appear, although it will be empty at the moment. (If you want to, visit my introduction to the Base main 事業/計画(する) 経営者/支配人 window.)

Click on the "Use wizard to create query" 仕事.

At the moment, your database only has one (米)棚上げする/(英)提議する, so the (米)棚上げする/(英)提議する 選択 is 討議する.

In step 1, in the 利用できる Fields column, 二塁打 click on the に引き続いて, in this order...

PhoneNumber
RestOfName
LastName

Click Next.

In step 2, 始める,決める the query to sort first by LastName, and then by RestOfName. Click Next.

In step 3, for now, do nothing.

Click Next.

In step 4, 割り当てる JUST the に引き続いて 偽名,通称:

LastName: Last 指名する

This step is of no 広大な/多数の/重要な importance in this instance, but it will give you nicer column headings in the results of running the query. 以前, I 示唆するd also changing the others, to "PhoneNumber: "Phone number" and "指名する", but just now (26 Oct 20) that 原因(となる)d a weird error. ("xx must be 明白な..."), and doing just "LastName" will illustrate 偽名,通称s and 満足させる 栄誉(を受ける). (You may be able to edit the query, once it has been saved once.) (I was on a 勝利,勝つ 10 machine, 64 bit, using "見解/翻訳/版: 6.3.6.2 (x64) Build ID: 2196df99b074d8a661f4036fca8fa0cbfa33a497 CPU threads: 4; OS: Windows 10.0; UI (判決などを)下す: default; VCL: 勝利,勝つ; 地元の: en-US (en_US); UI-Language: en-GB Calc: threaded", if you care!)

Whew! Is NOTHING simple?? Click "Next", to go on to step 5.

In step 8, make the query's 指名する "Phone 名簿(に載せる)/表(にあげる)- all numbers". You don't need to do anything else except click Finish. (If you want to 修正する the query, you will still be able to do that later.)

A data sheet should come up... 記録,記録的な/記録するs in a grid, one 列/漕ぐ/騒動 per 記録,記録的な/記録する, one field per column. 公式文書,認める that the 記録,記録的な/記録するs are sorted.

So. We can get the 名簿(に載せる)/表(にあげる) of phone numbers の上に the 審査する. What about printing it out. Shock! 狼狽! There's no "Print" 選択 in the menus!!

恐れる not. For now, I'll show you the "bodge" answer to that want. "報告(する)/憶測s" would be a better answer, and you will learn how to do them, if you read some more of my tutorials. But they are a story for another time. And the に引き続いて has it's place, anyway.

Open an ordinary Libre Office text 文書, i.e. 解雇する/砲火/射撃 up the Libre Office word 加工業者, 令状. From Base's 事業/計画(する) 経営者/支配人 window, drag the query 指名する to a blank 位置/汚点/見つけ出す on the text 文書. Answer some of the questions in the dialog box.

On your first visit, don't try to be clever. Don't do much. Just, say, use the ">" between the "Database" and "(米)棚上げする/(英)提議する" boxes to move, say, the とじ込み/提出するd 指名するs "Phone number" and "LastName" to the "(米)棚上げする/(英)提議する" box, and you will 得る a text 文書 with the results of the query on it in a (米)棚上げする/(英)提議する. (Don't be alarmed when, the next time you invoke the dialog box, it comes up as you left it this time. You can move field 指名するs 支援する to where they were before.

When you've made a simple (米)棚上げする/(英)提議する appear on the Writer 文書, play with the 過程 a bit. (If you want the columns' 指名するs to appear as column headings, just tick the "挿入する (米)棚上げする/(英)提議する 長,率いるing" 選択. There's no need to mess with e 所有物/資産/財産s there.)

A 詳細(に述べる) on "answer the questions...": You may find yourself moving all of the fields from the "(米)棚上げする/(英)提議する columns" box to the "Database columns" box, and then moving some 支援する again, one field at a time, until you get them in the order you want! (It is also possible to re-sequence the columns in the (米)棚上げする/(英)提議する after it has been 生成するd.))

By the way... there's nothing to stop you from creating several (米)棚上げする/(英)提議するs on a 選び出す/独身 "sheet" of Writer "paper". You can drag several queries (or even one query several times!) to the same Writer page. You might not do that often in 決まりきった仕事 use of the 製品, but while you are learning, you don't need to keep starting new Writer 文書s.

---
What we've just done illustrated something special to Libre Office and Open Office: The database 管理/経営 ソフトウェア is very tightly 統合するd with the other parts of the office 控訴. Instead of having a separate editor to manage 生産(高) from the database, the 生産(高) is done 経由で a wordprocessor 文書. (This remains true when you 卒業生(する) to using "報告(する)/憶測s".) When we worked with forms, earlier, did you notice that a Base form is 現実に "just" a Writer 文書? A fancy one, with clever, active, elements, admittedly... but still: A Writer 文書.

One 広大な/多数の/重要な 利益 of the tight 統合,差別撤廃 is that whenever you learn something to solve whatever is challenging you today, you are learning things which will be useful in other circumstances, too.

The way things are laid out after you 減少(する) a query の上に a blank Writer page may not 完全に 控訴 you. But whatever it takes to get the (米)棚上げする/(英)提議する as you want it for printing will be the same as what it takes to manipulate other (米)棚上げする/(英)提議するs in Writer 文書s from other sources at any 未来 date.


公式文書,認める: Once the data has been "収穫d" with a query, it doesn't 持続する a link with the database. I'll bet there's a way to make the 名簿(に載せる)/表(にあげる) of phone numbers stay in sync with その後の edits to the database, but I like the simple life, and will regenerate the Writer 文書 again if I need an updated phone 名簿(に載せる)/表(にあげる). (Again, when you use 報告(する)/憶測s, this want is assuaged.)




We're now going to do something not explicitly について言及するd in the 計画(する) at the start of this tutorial.

If you cast your mind 支援する to the 初期の planning of the database, you will remember why we created the "PhonePriority" field. The idea was that we might want to create a 名簿(に載せる)/表(にあげる) of just the numbers we phone often. By putting "1" in the "PhonePriority" field of those numbers, and something else in that field for other 記録,記録的な/記録するs, we can 遂行する the selective 名簿(に載せる)/表(にあげる).

Make a new query, Do 正確に/まさに what you did before, but....

In step 1, (米ソ間の)戦略兵器削減交渉 by changing the "(米)棚上げする/(英)提議する" selected by the 減少(する)-負かす/撃墜する at the 最高の,を越す of the dialog. Make it "(米)棚上げする/(英)提議する:NameAddrPhone"... さもなければ you won't have all of the (米)棚上げする/(英)提議する's fields 利用できる!

さもなければ, do what you did before, but 含む the PhonePriority field for the query, too.

In step 3 始める,決める a search 条件 which says "PhonePriority is equal to" 1.

Call this 名簿(に載せる)/表(にあげる) "Phone 名簿(に載せる)/表(にあげる)-優先 1 numbers".

When you drag the query to a Writer page ーするために create a printable 見解/翻訳/版 of the 名簿(に載せる)/表(にあげる), there's no 推論する/理由 to 含む the PhonePriority field.

Success! Moving on.....



遂行する/発効させるing the 計画(する), part two- 指名するs- by- 明言する/公表する 名簿(に載せる)/表(にあげる) _________

Open the database, if it isn't open already.

Click on "Use wizard to create query" again.

In step 1, field 選択, remember you may need to start by changing the "(米)棚上げする/(英)提議する" selected by the 減少(する)-負かす/撃墜する at the 最高の,を越す of the dialog. Make it "(米)棚上げする/(英)提議する:NameAddrPhone".

Still in Step 1, 二塁打 click on the LastName, RestOfName and StateOrProvince fields. Click Next.

In step 2, 始める,決める the sorting order as...

StateOrProvince, then
LastName, then
RestOfName

Click Next.

Change nothing in step 3. Click Next.

You will go straight to step 7. This isn't what I 手配中の,お尋ね者 or 推定する/予想するd, to be honest. It would be nice if we could use the "配合" feature.... but we don't need it, and I couldn't get it to become 利用できる. Sigh. (It is a story for another time, but if, after you finish this query, you use the 報告(する)/憶測 creating wizard, ask it to create a 報告(する)/憶測 based on this query, and select "Group by StateOrProvince" at the appropriate moment, then you'll get a grouped 報告(する)/憶測 やめる easily.)

In step 7, I once again had trouble if I tried to use 偽名,通称s. They "should" work, and are "nice"... but they aren't 価値(がある) fighting with now. When the 残り/休憩(する) has worked for you, see how far you can get! Click Next.

In step 8, 指名する the query "指名するs by 明言する/公表する."

Voila! Done! You'll get a 名簿(に載せる)/表(にあげる) of everyone's phone numbers, but with all the people from Arizona in one section, the people from Arkansas in another, etc.




A little 特別手当 for all of you good people who are still reading....

Suppose you have many, many 指名するs in your database, and you want just the 指名するs of people from California?

の近くに anything which may be open, apart from the 事業/計画(する) 経営者/支配人.

権利 click on your "指名するs by 明言する/公表する" query. Click "Copy".

権利 click どこかよそで in the "Queries" パネル盤. Click "Paste". change the 指名する to "Numbers in CA", 圧力(をかける) enter.

権利 click on your "Numbers in CA" query. Click on "Edit".

The fancy 支配(する)/統制する パネル盤 which comes up gives you lots of 適切な時期s. To make the query 名簿(に載せる)/表(にあげる) just people from California, just 追加する CA (No 引用する 示すs or anything else around that are needed... but the next time you open the designer, you'll find apostrophes around the CA.) in the "criterion" 独房 of the "StateOrProvince" column. Once you've done that, save the query, の近くに the query "designer" (i.e. editor), run the query.

... OR you can just run the query 直接/まっすぐに from within the editor. There's an icon for that on the toolbar at the 最高の,を越す of the window. It's tooltip hint is "Run query". Look for "Run query" in the Edit sub-menu, and you can see the icon and the shortcut 重要な.) (公式文書,認める also, if you go the "Run in editor" 大勝する, the result of the query appears in a new pane at the 最高の,を越す of the Query designer.)

More "unnecessary" stuff, but 冷静な/正味の: Real men don't mess about with GUI design 道具s, they chew 弾丸s and 令状 raw code. For this database, that means 令状ing SQL code. Joking apart: いつかs raw code is the fastest, clearest, most direct 大勝する to where you want to be. If, in the query editor, you "Switch design 見解(をとる) off", (it's in the "見解(をとる)" sub-menu") you'll see the SQL for the query you have 明示するd so far.

I should について言及する here that this guide is now ーするつもりであるd for Libre Office Base running the embedded Firebird engine. When you start delving into the underlying SQL, the HSQL engine may 井戸/弁護士席 want something わずかに different, and "slight" differences can 事柄".

The SQL for our "Numbers in CA" query is:

SELECT "LastName" "LastName", "RestOfName" "RestOfName", "StateOrProvince" "StateOrProvince" FROM "NameAddrPhone" WHERE "StateOrProvince" = 'CA' ORDER BY "StateOrProvince" ASC, "LastName" ASC, "RestOfName" ASC

I 嫌疑者,容疑者/疑う we are seeing each field 指名する twice because the second is where the 偽名,通称 would go... if we "割れ目" using 偽名,通称s! (A more explicit SQL 見解/翻訳/版 would be "SELECT "LastName" AS "LastName", "RestOfName" AS "RestOfName",..." but it may be 許容できる to leave the "AS" 暗示するd. And if we were USING 偽名,通称s which were different from the underlying field 指名する the SQL would look something like... "SELECT "LastName" AS "Last 指名する", "RestOfName" AS "残り/休憩(する) of 指名する",..."

---
(The next paragraph is DATED! I would, 10/2020, 示唆する that you use Libre Office and the Firebird embedded engine. While its SQL is 類似の to the HSQL, it won't be the same, and you should go to Firebird documentation.)

The HSQLDB.ORG 言及/関連 手動式の is a wonderful 資源 for those who like 根底となる 鮮明度/定義s of how ソフトウェア 作品. Have a look, for instance at the intro to data types. . (Once you master how the (警察などへの)密告,告訴(状) is 現在のd. Yes, it really is 価値(がある) mastering that syntax.)

If you start using some of the more esoteric 構成要素 from the HSQL 手動式の, you may need to learn about turning off Base's SQL syntax checking... but don't let that worry you over-much if you are just getting started.

結論するing 発言/述べるs _________

Do remember I said at the beginning that these queries are not the fanciest queries you can make. But I hope they have started you along the path of understanding queries, and their use. Queries 許す you to 抽出する the 記録,記録的な/記録するs you want from the underlying (米)棚上げする/(英)提議するs which are the 創立/基礎 of your database. They 許す you to 抽出する just the fields you need, and they let you 組織する the data to 控訴 your needs.





編集(者)の Philosophy

I dislike 'fancy' websites with more 関心 for a flashy 外見 than for good content. For a pretty picture, I can go to an art gallery. Of course, an attractive 場所/位置 WITH content deserves 賞賛する... as long as that pretty 直面する doesn't cost download time. In any 事例/患者....

I am trying to 現在の this 構成要素 in a 判型 which makes it 平易な for you to USE it. There are two 面s to that: The way it is 分裂(する) up, and the way it is 地位,任命するd. See the main 索引 to this 構成要素 for more (警察などへの)密告,告訴(状) about the way it is 分裂(する) up, and the way it is 地位,任命するd.


広告 from page's editor: Yes.. I do enjoy 収集するing these things for you... I hope they are helpful. However.. this doesn't 支払う/賃金 my 法案s!!! If you find this stuff useful, (and you run an MS-DOS or Windows PC) please visit my freeware and shareware page, download something, and 循環させる it for me? Links on your page to this page would also be 高く評価する/(相場などが)上がるd!

PLEASE >>> Click here to visit editor's Sheepdog ソフトウェア freeware, shareware pages <<< PLEASE


If you liked this Libre Office Base tutorial, see the main 索引 for (警察などへの)密告,告訴(状) other help from the same author.

Editor's email 演説(する)/住所. Suggestions welcomed!     - - -    Want a 場所/位置 hosted, or email? I like 1&1's services.




Click to check for W3.org HTML validity tester Page has been 実験(する)d for 同意/服従 with INDUSTRY (not MS-only) 基準s, using the 解放する/自由な, 公然と accessible validator at validator.w3.org. Mostly passes.

AND passes... Click to check CSS validity


One last bit of advice: Be sure you know all you need to about spyware.

. . . . . P a g e . . . E n d s . . . . .