Top Banner
1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI
51

1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Jan 02, 2016

Download

Documents

Spencer Dorsey
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

1

What’s the Worst that could Happen?Trouble-Shooting Your Voyager Queries

ELSUGOctober 8, 2009

Cathy SalikaCARLI

Page 2: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Will this query tell me how many items I have in each location?

2

Page 3: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Moral: Always remove extra tables from your queries.

3

Page 4: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Will this query tell me how many MFHDs I have in each location?

4

Page 5: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

5

Page 6: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Null is a special value

6

This library has 14,470 MFHDs

0 MFHDs 13,071 MFHDs

Page 7: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

The missing MFHDs have a value of Null

7

1,399 MFHDs

Page 8: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Null is…

8

… different from blank

… different from zero

Null means that the value has not been filled in.

And null fields are not counted with the Count function!

Page 9: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Moral: Never Count a field that might have a null value in it.

9

The _ID fields usually do not have a null value.

Page 10: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Null is a special value

10

This library has 14,470 MFHDs

0 MFHDs 13,071 MFHDs

Page 11: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

11

Page 12: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Moral: Use simple queries to check the results of complicated ones.

12

Page 13: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Will this count the items that circulated during 2007?

13

Page 14: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Moral: Dates default to 12:00 a.m. unless you specify a time.

14

In criteria, you usually have to specify the day after the last date that you want:

Between #1/1/2007# And #1/1/2008#

Page 15: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Moral: You need to know what’s in the tables.

15

When an item is discharged, the circ transaction moves from CIRC_TRANSACTIONS to CIRC_TRANS_ARCHIVE.

Page 16: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

How am I supposed to know that for every table???

16

The Data Dictionary!

CARLI’s version of the Data Dictionary is available on EL Commons.

Page 17: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

17

CIRC_TRANS… TablesCirculation transactions are recorded in CIRC_TRANSACTIONS until the item is discharged, after which they are moved to CIRC_TRANS_ARCHIVE. Consequently, the discharge… fields in CIRC_TRANSACTIONS are always blank.  When a transaction is archived, the value of circ_transaction_id is changed. In both tables, circ_transaction_id is assigned sequentially as a record is added.  For many circ statistics, you will want to combine data from these two tables. Endeavor provides an Access query called “Circulation Transactions (Charges)” which does this for you. From an Add Tables window in Access, click the Queries tab and you’ll find it. The charge_type and discharge_type fields have 2 values, N for Normal and O for Override. 

Page 18: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

18

PATRON_GROUP p. 2, 6, 7, 8, 11, 15, 20, 21, 28, 29, 30, 35 charge_limit number charge_limit_apply character 1 circ_cluster_id number patron_group_id number charged_status_display character 1 demerits_applies character 1 max_demerits number patron_group_code character 10 patron_group_display character 40 patron_group_name character 25 suspension_days number

Page 19: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

19

FISCAL_PERIOD p. 13The fiscal_period_id field in FISCAL_PERIOD can be used to link to fiscal_year_id field in LEDGER. This isn’t obvious from the names.

end_date date fiscal_period_id number fiscal_period_name character 25 start_date date

Page 20: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

20

BIB_MEDIUMThe medium field holds the first byte of the 007 from a bib record. Voyager uses this table to limit searches by “medium” in the staff clients or “additional format specification” in Web Voyage. bib_id number medium character 1

Page 21: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

21

ELINK_INDEX p. 36The starred fields in this table are in UTF-8. ELINK_INDEX is a very handy place to find URLs from various types of records.  Record_type is supposed to be interpreted by the ELINK_RECORD_TYPE table, but there are some errors. Actual values for record_type are A for Authority, B for Bibliographic, E for Electronic item, and M for MFHD. (ELINK_RECORD_TYPE has a row, I for Item, but you can’t have a URL in an item.)  The record_id is either an auth_id, a bib_id, an eitem_id, or a mfhd_id, depending on the value of record_type.  As a general rule, the link field is 856$u and the link_text field is subfields $z and $3. See Appendix B for more details.

Page 22: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Moral: The Data Dictionary is worth its weight in gold.

22

Page 23: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Will this count the items that circulated during 2007?

23

Page 24: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

24

What does your library do when an item is lost?

Delete the item,delete the MFHD,and delete the bib?

Change the item status and/or location,opac-suppress the MFHD, andopac-suppress the bib?

Or a little of both?

Page 25: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Moral: You need to know your library’s practice.

25

This is especially important with reserves.

Page 26: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Does this query count circulation in 2007 by item type?

26

Page 27: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

A view is a query that lives on the Voyager server.

27

You can treat it like a table.

But it’s hard to know what it does unless you find the SQL on the server and read it, which isn’t easy.

In Voyager, view names end with _VW.

Page 28: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

CIRCCHARGES_VW

28

Page 29: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

29

648 rows

1190 rows

Page 30: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Moral: Don’t use views, especially in circ and acq.

30

These are bad:circcharges_vw circrenew_vwitem_vwissue_vwserials_vw

I like these:*class_vwmarc*_vw

Page 31: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

The Views I Use

31

The marc*_vw’s make fixed fields more accessible.

marcbook_vw marccomputer_vwmarcmap_vw marcmusic_vw marcserial_vwmarcvisual_vw

The *class_vw’s parse call numbers for you:

deweyclass_vw lcclass_vw nalclass_vw nlmclass_vw sudocclass_vw etc.

Page 32: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

CALL_NO_TYPE and the *CLASS_VW’s

32

In a MFHD, the 852 1st indicator is the class scheme. 0=LC 1=Dewey 8=Other etc.

This value usually goes into CALL_NO_TYPE in MFHD_MASTER.

CALL_NO_TYPE determines which *CLASS_VW a call number goes into.

Page 33: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

So you think your library is all LC?

33

Page 34: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

With the *class_vw’s you can get nice statistics by class.

34

Page 35: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Moral: Always check call_no_type before using the *class_vw’s.

35

Page 36: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

36

Why is Grouping turned on in this query?

Page 37: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

If you need to de-duplicate, use Unique Values.

37

Right click on the background of the design pane.Select Properties.Change Unique Values to Yes.

Page 38: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Moral: Use Group By like you really mean it.

38

Page 39: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

What do these queries do?

39

Page 40: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Better?

40

Page 41: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

To enter a description…

41

right-click on the query name and select Properties.

Page 42: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

42

Page 43: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Another way to annotate

43

Page 44: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

To create a Group…

44

right-click anywhere in the Groups pane and select New Group.

Page 45: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Name the New Group

45

Page 46: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

To add a query to a Group

46

Just drag & drop

Page 47: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

To delete a query from a group

47

…highlight it and hit the Delete key.Notice that you’re deleting the shortcut to the query,not the query itself.

Page 48: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Moral: Document! Document! Document!

48

Page 49: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Reuse your queries so you can see trends.

49

Page 50: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Moral: Sometimes it’s more important to be consistent than to be correct.

50

Page 51: 1 What’s the Worst that could Happen? Trouble-Shooting Your Voyager Queries ELSUG October 8, 2009 Cathy Salika CARLI.

Thank you!

51