SlideShare a Scribd company logo
“JUST ONE MORE THING”:
Tweaking and Embellishing
Access Queries
episode produced by:
Alan Manifold
Systems Implementation Manager
Purdue University Libraries
manifold@purdue.edu
starring:
Microsoft Access
THE PROBLEM
There are always new things to add
There are always new queries to write
Many queries are actually wrong
Like good detectives, we have
to keep going back until we get
everything nailed down.
QUERY MAINTENANCE
Because you keep going back to queries,
make them easy to maintain. Which of
these would you rather tweak?
They do the same
thing, but the bottom
one is much easier
to follow.
FLEXIBILITY
Seize every chance to make your queries
more flexible.
• Hard-code as little as possible
• Use prompts for criteria
• Permit a wide range of criteria
• Include intermediate tables
FIRST: ANALYZE QUERY
It is foolhardy to start tweaking a query if
you don’t really know what it does. If it’s
one of your
queries, you
have a
headstart.
BE THE MACHINE
Talk yourself through the query.
“Each bib is linked to its line item. If we don’t
have an order, the bib will be dropped. We
link each line item to a subscription. If it’s
a monograph, there won’t be one, so the
results will only include serials and
continuations.”
KEEP TALKING
“Each subscription
is linked to a
component, and
each component is
linked through
the COMPONENT_PATTERN table to the pattern
defined for that component. So, we end up
with each serial we receive being linked
to the associated pattern.”
NOW THE BOTTOM PART
“We have a list of
each bib record
linked with its
pattern. Now, we
grab the BIB_ID and TITLE from one end and the
pattern’s name from the other. So, for each serial
that has a subscription (current or ceased) and a
component, we will see the title, along
with the name of the pattern we’re using
to receive it.”
TWEAK ONLY NOW
Now that you understand the current
query, you can consider adding to it.
“I’d like to find all of our serials that come more
frequently than once a month. The frequency should
be associated with the pattern, so this query should be
a good place to start. I will need to locate the
frequency information, then add criteria that
will screen out the monthlies and less
frequent patterns.”
Frequency > “Once a Month”
LOOK AT THE TABLES!!!
You want specific frequencies, but you
need to know how that information is
stored. The ONLY WAY is to look at the
tables themselves.
SOMETHING’S MISSING
The
PATTERN
table says
this:
Acq says this:
“There must be a
key somewhere!
I’ll look at more
tables.”
WHAT’S IT CALLED?
“Pattern— something?
No, there doesn’t seem to
be one. How about
Frequency— something?
BINGO!”
LOOK AT THE TABLE!!!
You could specify:
Frequencies (e.g. “Semiweekly”, “Daily”),
Codes (e.g. “c”, “d”, “e”, “w”)
or you could just check for
FREQ_CALC_TYPE = “d”.
WHAT WILL BE
EASIEST TO
MAINTAIN?
ADDING A TABLE
To add a table to an existing
query, open the query, and find
the icon in the toolbar for
“Add Table”
TEST THE QUERY
Do
a
test
run
to
see
if:
* All of the returned results make sense
* All expected records are returned
WHAT DID WE JUST DO?
Analyze one or more queries
Know what you need to change
Find the tables and fields you will need
Make changes, one at a time
Test the query with each change
The same process applies to
your own queries, queries from
elsewhere or the prepackaged
queries.
JOIN SIDE EFFECTS
Joining tables
often results in
more or fewer
records in the
results.
More…
One record
per bib
One record per MFHD
JOIN SIDE EFFECTS
Only patron barcodes with proxies
All patron
barcodes
Less…
ADDING AND DELETING
If you don’t know how a new table will
affect a query, test!
1489143
2210175
Why?
CRITERIA ISSUES
Placement and appropriateness
Operators: comparison, Boolean, Between
Pattern matching
Prompting
Dates and criteria
Criteria with grouping
CRITERIA PLACEMENT
Put criteria on the “Criteria” line under
the field to which they apply.
APPROPRIATE CRITERIA
Be sure your criteria make sense with the
actual values in the field you are using
them with. Run the query without criteria
to see what the values are.
This one
won’t
work as
is.
CRITERIA & OPERATORS
Add operators to specify more complex
criteria than simple equality.
Boolean:
And
Or
Not
Comparison:
<>
<
>
<=
>= Between:
Between 5 And 10
Between #6/4# And #6/5#
Combined:
>10 And <15
<> “this” And <> “that”
“VHS” or “CD-ROM”
PATTERN MATCHING
With text fields, you can do pattern
matching, using the asterisk as a wildcard.
Anything that
ends with “s”
Anything that
starts with “GP”
Call number has
“PER” anywhere in it.
PROMPT FOR CRITERIA
Make your
queries more
flexible by using
prompts instead
of hard-coding
the criteria.
When you add a prompt, make
sure it clearly asks for what it
wants. What does “start” want?
DATES AND CRITERIA
All Date fields in Voyager are Date/Time
fields, which affects your criteria.
#02/14/2004# = #02/14/2004 00:00:00# ≠
#03/06/2003# = #03/06/2003 00:00:00# ≠
#02/14/2004# = #02/14/2004 00:00:00# ≠
#02/14/2004# = #02/14/2004 00:00:00# ≠
#02/15/2004# = #02/15/2004 00:00:00# ≠
#09/20/2002# = #09/20/2002 00:00:00# ≠
#02/15/2004# = #02/15/2004 00:00:00# ≠
#12/04/2003# = #12/04/2003 00:00:00# ≠
#02/15/2004# = #02/15/2004 00:00:00# ≠
#02/15/2004# = #02/15/2004 00:00:00# ≠
Date constants without times are
that date at exactly midnight.
DATE RANGES
Between #6/4/2004# And #6/5/2004#
4 June 2004 5 June 2004
One day’s data, from one
midnight to the next.
16 816 16 16 16 16 16
0/24 0/24 0/24 0/24 0/24 0/24 0/24
EXPRESSIONS
Using expressions
expands the range
of values that can
be returned.
An expression is any
transformation of
current values into
new values.
Extract the 7th single
character from the 008 field
and check if it’s a “c”.
MORE EXPRESSIONS
Add charges and browses, numerically
Convert title to
upper case before
doing case
sensitive
comparison
Change date to a day name
to match input criteria
Convert a monetary
amount to dollars and cents
QUESTIONS?
If we have time, I can work through
one or more examples.

More Related Content

What's hot

Widening your JavaScript Application
Widening your JavaScript ApplicationWidening your JavaScript Application
Widening your JavaScript ApplicationAlex McPherson
 
RxJS: A Beginner & Expert's Perspective - ng-conf 2017
RxJS: A Beginner & Expert's Perspective - ng-conf 2017RxJS: A Beginner & Expert's Perspective - ng-conf 2017
RxJS: A Beginner & Expert's Perspective - ng-conf 2017
Tracy Lee
 
The Power of RxJS in Nativescript + Angular
The Power of RxJS in Nativescript + AngularThe Power of RxJS in Nativescript + Angular
The Power of RxJS in Nativescript + Angular
Tracy Lee
 
You have no idea what your users want - WordCamp PDX
You have no idea what your users want - WordCamp PDXYou have no idea what your users want - WordCamp PDX
You have no idea what your users want - WordCamp PDX
Evan Solomon
 
HTML Emails in Rails 3
HTML Emails in Rails 3HTML Emails in Rails 3
HTML Emails in Rails 3
John Barton
 
A Practical Approach to React Native at All Things Open Conference
A Practical Approach to React Native at All Things Open ConferenceA Practical Approach to React Native at All Things Open Conference
A Practical Approach to React Native at All Things Open Conference
Tracy Lee
 
How and When To Code Review
How and When To Code ReviewHow and When To Code Review
How and When To Code Review
Paul Gower
 

What's hot (7)

Widening your JavaScript Application
Widening your JavaScript ApplicationWidening your JavaScript Application
Widening your JavaScript Application
 
RxJS: A Beginner & Expert's Perspective - ng-conf 2017
RxJS: A Beginner & Expert's Perspective - ng-conf 2017RxJS: A Beginner & Expert's Perspective - ng-conf 2017
RxJS: A Beginner & Expert's Perspective - ng-conf 2017
 
The Power of RxJS in Nativescript + Angular
The Power of RxJS in Nativescript + AngularThe Power of RxJS in Nativescript + Angular
The Power of RxJS in Nativescript + Angular
 
You have no idea what your users want - WordCamp PDX
You have no idea what your users want - WordCamp PDXYou have no idea what your users want - WordCamp PDX
You have no idea what your users want - WordCamp PDX
 
HTML Emails in Rails 3
HTML Emails in Rails 3HTML Emails in Rails 3
HTML Emails in Rails 3
 
A Practical Approach to React Native at All Things Open Conference
A Practical Approach to React Native at All Things Open ConferenceA Practical Approach to React Native at All Things Open Conference
A Practical Approach to React Native at All Things Open Conference
 
How and When To Code Review
How and When To Code ReviewHow and When To Code Review
How and When To Code Review
 

Viewers also liked

Internet de las cosas
Internet de las cosasInternet de las cosas
Internet de las cosas
bmartrodri
 
Commerce Classes in Chandigarh
Commerce Classes in ChandigarhCommerce Classes in Chandigarh
Commerce Classes in Chandigarh
chdcommerce1
 
تطوير كراسات التدريبات لتعليم اللغة العربية
  تطوير كراسات التدريبات لتعليم اللغة العربية  تطوير كراسات التدريبات لتعليم اللغة العربية
تطوير كراسات التدريبات لتعليم اللغة العربية
Ananda Fitri Aha
 
Air pollution
Air pollutionAir pollution
Air pollutiondjennet
 
أصوات اللغة العربية وأهميتها في تعليم اللغة العربية 1
أصوات اللغة العربية وأهميتها في تعليم اللغة العربية 1أصوات اللغة العربية وأهميتها في تعليم اللغة العربية 1
أصوات اللغة العربية وأهميتها في تعليم اللغة العربية 1
Ananda Fitri Aha
 
Baha'i Views on Faith and Marriage
Baha'i Views on Faith and MarriageBaha'i Views on Faith and Marriage
Baha'i Views on Faith and Marriage
Alan Manifold
 
Access Reports for Tenderfeet (or is that tenderfoots?)
Access Reports for Tenderfeet (or is that tenderfoots?) Access Reports for Tenderfeet (or is that tenderfoots?)
Access Reports for Tenderfeet (or is that tenderfoots?)
Alan Manifold
 
Nilai un 2014 jurusan ips
Nilai un 2014   jurusan ipsNilai un 2014   jurusan ips
Nilai un 2014 jurusan ipssmanema
 
Alan vs the BLOB
Alan vs the BLOBAlan vs the BLOB
Alan vs the BLOB
Alan Manifold
 
Reports and Forms: the finishing touches for Access Reporting (on the Voyager...
Reports and Forms: the finishing touches for Access Reporting (on the Voyager...Reports and Forms: the finishing touches for Access Reporting (on the Voyager...
Reports and Forms: the finishing touches for Access Reporting (on the Voyager...
Alan Manifold
 
Nilai un 2014 jurusan ipa
Nilai un 2014   jurusan ipaNilai un 2014   jurusan ipa
Nilai un 2014 jurusan ipasmanema
 
Deep Links Into Primo
Deep Links Into PrimoDeep Links Into Primo
Deep Links Into Primo
Alan Manifold
 
Making Materials Findable at the State Library of Victoria
Making Materials Findable at the State Library of VictoriaMaking Materials Findable at the State Library of Victoria
Making Materials Findable at the State Library of Victoria
Alan Manifold
 
Making materials findable at State Library Victoria, May 2015
Making materials findable at State Library Victoria, May 2015Making materials findable at State Library Victoria, May 2015
Making materials findable at State Library Victoria, May 2015
Alan Manifold
 
Some Meditations for Baha'i Elections
Some Meditations for Baha'i ElectionsSome Meditations for Baha'i Elections
Some Meditations for Baha'i Elections
Alan Manifold
 
Tentang sman 1 manyar
Tentang sman 1 manyarTentang sman 1 manyar
Tentang sman 1 manyarsmanema
 
Using Access to Create Reports from Voyager (Microsoft Access with the Voyage...
Using Access to Create Reports from Voyager (Microsoft Access with the Voyage...Using Access to Create Reports from Voyager (Microsoft Access with the Voyage...
Using Access to Create Reports from Voyager (Microsoft Access with the Voyage...
Alan Manifold
 

Viewers also liked (18)

Internet de las cosas
Internet de las cosasInternet de las cosas
Internet de las cosas
 
Commerce Classes in Chandigarh
Commerce Classes in ChandigarhCommerce Classes in Chandigarh
Commerce Classes in Chandigarh
 
تطوير كراسات التدريبات لتعليم اللغة العربية
  تطوير كراسات التدريبات لتعليم اللغة العربية  تطوير كراسات التدريبات لتعليم اللغة العربية
تطوير كراسات التدريبات لتعليم اللغة العربية
 
Air pollution
Air pollutionAir pollution
Air pollution
 
أصوات اللغة العربية وأهميتها في تعليم اللغة العربية 1
أصوات اللغة العربية وأهميتها في تعليم اللغة العربية 1أصوات اللغة العربية وأهميتها في تعليم اللغة العربية 1
أصوات اللغة العربية وأهميتها في تعليم اللغة العربية 1
 
Baha'i Views on Faith and Marriage
Baha'i Views on Faith and MarriageBaha'i Views on Faith and Marriage
Baha'i Views on Faith and Marriage
 
Access Reports for Tenderfeet (or is that tenderfoots?)
Access Reports for Tenderfeet (or is that tenderfoots?) Access Reports for Tenderfeet (or is that tenderfoots?)
Access Reports for Tenderfeet (or is that tenderfoots?)
 
Nilai un 2014 jurusan ips
Nilai un 2014   jurusan ipsNilai un 2014   jurusan ips
Nilai un 2014 jurusan ips
 
Executive summary
Executive summaryExecutive summary
Executive summary
 
Alan vs the BLOB
Alan vs the BLOBAlan vs the BLOB
Alan vs the BLOB
 
Reports and Forms: the finishing touches for Access Reporting (on the Voyager...
Reports and Forms: the finishing touches for Access Reporting (on the Voyager...Reports and Forms: the finishing touches for Access Reporting (on the Voyager...
Reports and Forms: the finishing touches for Access Reporting (on the Voyager...
 
Nilai un 2014 jurusan ipa
Nilai un 2014   jurusan ipaNilai un 2014   jurusan ipa
Nilai un 2014 jurusan ipa
 
Deep Links Into Primo
Deep Links Into PrimoDeep Links Into Primo
Deep Links Into Primo
 
Making Materials Findable at the State Library of Victoria
Making Materials Findable at the State Library of VictoriaMaking Materials Findable at the State Library of Victoria
Making Materials Findable at the State Library of Victoria
 
Making materials findable at State Library Victoria, May 2015
Making materials findable at State Library Victoria, May 2015Making materials findable at State Library Victoria, May 2015
Making materials findable at State Library Victoria, May 2015
 
Some Meditations for Baha'i Elections
Some Meditations for Baha'i ElectionsSome Meditations for Baha'i Elections
Some Meditations for Baha'i Elections
 
Tentang sman 1 manyar
Tentang sman 1 manyarTentang sman 1 manyar
Tentang sman 1 manyar
 
Using Access to Create Reports from Voyager (Microsoft Access with the Voyage...
Using Access to Create Reports from Voyager (Microsoft Access with the Voyage...Using Access to Create Reports from Voyager (Microsoft Access with the Voyage...
Using Access to Create Reports from Voyager (Microsoft Access with the Voyage...
 

Similar to One More Thing: Tweaking and Embellishing Access Queries

Metric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in OracleMetric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in Oracle
Steve Karam
 
Clean code quotes - Citações e provocações
Clean code quotes - Citações e provocaçõesClean code quotes - Citações e provocações
Clean code quotes - Citações e provocações
André de Fontana Ignacio
 
Better Search Engine Testing
Better Search Engine TestingBetter Search Engine Testing
Better Search Engine Testing
OpenSource Connections
 
iOS Test-Driven Development
iOS Test-Driven DevelopmentiOS Test-Driven Development
iOS Test-Driven Development
Pablo Villar
 
You Can Tune Your Own SQL Code
You Can Tune Your Own SQL CodeYou Can Tune Your Own SQL Code
You Can Tune Your Own SQL Code
Mike Walsh
 
Test Driven Development with Laravel
Test Driven Development with LaravelTest Driven Development with Laravel
Test Driven Development with Laravel
Tyler Johnston
 
Tips and tricks to win kaggle data science competitions
Tips and tricks to win kaggle data science competitionsTips and tricks to win kaggle data science competitions
Tips and tricks to win kaggle data science competitions
Darius Barušauskas
 
powerpoint 1-19.pdf
powerpoint 1-19.pdfpowerpoint 1-19.pdf
powerpoint 1-19.pdf
JuanPicasso7
 
Simplify Your Life with CQRS
Simplify Your Life with CQRSSimplify Your Life with CQRS
Simplify Your Life with CQRS
Joel Mason
 
Intro to TDD
Intro to TDDIntro to TDD
Intro to TDD
Jason Nocks
 
LecccccccccccccProgrammingLecture-09.pdf
LecccccccccccccProgrammingLecture-09.pdfLecccccccccccccProgrammingLecture-09.pdf
LecccccccccccccProgrammingLecture-09.pdf
AmirMohamedNabilSale
 
How to fix bug or defects in software
How to fix bug or defects in software How to fix bug or defects in software
How to fix bug or defects in software
Rajasekar Subramanian
 
Barga Data Science lecture 9
Barga Data Science lecture 9Barga Data Science lecture 9
Barga Data Science lecture 9
Roger Barga
 
Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)
Danny Preussler
 
Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...
Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...
Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...
FalafelSoftware
 
The Apex Ten Commandments
The Apex Ten CommandmentsThe Apex Ten Commandments
The Apex Ten Commandments
Salesforce Developers
 
Unit testing
Unit testingUnit testing
Unit testing
PiXeL16
 
The Key to Keys - Database Design
The Key to Keys - Database DesignThe Key to Keys - Database Design
The Key to Keys - Database Design
Karen Lopez
 
Automated Testing but like for PowerShell (April 2012)
Automated Testing but like for PowerShell (April 2012)Automated Testing but like for PowerShell (April 2012)
Automated Testing but like for PowerShell (April 2012)
Rob Reynolds
 
Mysql query optimization
Mysql query optimizationMysql query optimization
Mysql query optimizationBaohua Cai
 

Similar to One More Thing: Tweaking and Embellishing Access Queries (20)

Metric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in OracleMetric Abuse: Frequently Misused Metrics in Oracle
Metric Abuse: Frequently Misused Metrics in Oracle
 
Clean code quotes - Citações e provocações
Clean code quotes - Citações e provocaçõesClean code quotes - Citações e provocações
Clean code quotes - Citações e provocações
 
Better Search Engine Testing
Better Search Engine TestingBetter Search Engine Testing
Better Search Engine Testing
 
iOS Test-Driven Development
iOS Test-Driven DevelopmentiOS Test-Driven Development
iOS Test-Driven Development
 
You Can Tune Your Own SQL Code
You Can Tune Your Own SQL CodeYou Can Tune Your Own SQL Code
You Can Tune Your Own SQL Code
 
Test Driven Development with Laravel
Test Driven Development with LaravelTest Driven Development with Laravel
Test Driven Development with Laravel
 
Tips and tricks to win kaggle data science competitions
Tips and tricks to win kaggle data science competitionsTips and tricks to win kaggle data science competitions
Tips and tricks to win kaggle data science competitions
 
powerpoint 1-19.pdf
powerpoint 1-19.pdfpowerpoint 1-19.pdf
powerpoint 1-19.pdf
 
Simplify Your Life with CQRS
Simplify Your Life with CQRSSimplify Your Life with CQRS
Simplify Your Life with CQRS
 
Intro to TDD
Intro to TDDIntro to TDD
Intro to TDD
 
LecccccccccccccProgrammingLecture-09.pdf
LecccccccccccccProgrammingLecture-09.pdfLecccccccccccccProgrammingLecture-09.pdf
LecccccccccccccProgrammingLecture-09.pdf
 
How to fix bug or defects in software
How to fix bug or defects in software How to fix bug or defects in software
How to fix bug or defects in software
 
Barga Data Science lecture 9
Barga Data Science lecture 9Barga Data Science lecture 9
Barga Data Science lecture 9
 
Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)
 
Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...
Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...
Unit Testing and Behavior Driven Testing with AngularJS - Jesse Liberty | Fal...
 
The Apex Ten Commandments
The Apex Ten CommandmentsThe Apex Ten Commandments
The Apex Ten Commandments
 
Unit testing
Unit testingUnit testing
Unit testing
 
The Key to Keys - Database Design
The Key to Keys - Database DesignThe Key to Keys - Database Design
The Key to Keys - Database Design
 
Automated Testing but like for PowerShell (April 2012)
Automated Testing but like for PowerShell (April 2012)Automated Testing but like for PowerShell (April 2012)
Automated Testing but like for PowerShell (April 2012)
 
Mysql query optimization
Mysql query optimizationMysql query optimization
Mysql query optimization
 

More from Alan Manifold

Photo retrospective of the life of Rosemary Manifold
Photo retrospective of the life of Rosemary ManifoldPhoto retrospective of the life of Rosemary Manifold
Photo retrospective of the life of Rosemary Manifold
Alan Manifold
 
What Were Once Habits Are Now Vices
What Were Once Habits Are Now VicesWhat Were Once Habits Are Now Vices
What Were Once Habits Are Now Vices
Alan Manifold
 
Why I Hope ENCompass Continues to Fail
Why I Hope ENCompass Continues to FailWhy I Hope ENCompass Continues to Fail
Why I Hope ENCompass Continues to Fail
Alan Manifold
 
Queer Buy for the Straight Li-brary (Endeavor's ENCompass)
Queer Buy for the Straight Li-brary (Endeavor's ENCompass)Queer Buy for the Straight Li-brary (Endeavor's ENCompass)
Queer Buy for the Straight Li-brary (Endeavor's ENCompass)
Alan Manifold
 
DigiTool API Project
DigiTool API ProjectDigiTool API Project
DigiTool API Project
Alan Manifold
 
Evolution of Libraries and Metadata
Evolution of Libraries and MetadataEvolution of Libraries and Metadata
Evolution of Libraries and Metadata
Alan Manifold
 
Buried Treasure: Finding Reporting Gold in the Voyager Tables (using Microsof...
Buried Treasure: Finding Reporting Gold in the Voyager Tables (using Microsof...Buried Treasure: Finding Reporting Gold in the Voyager Tables (using Microsof...
Buried Treasure: Finding Reporting Gold in the Voyager Tables (using Microsof...
Alan Manifold
 
Art - advanced reporting techniques
Art - advanced reporting techniquesArt - advanced reporting techniques
Art - advanced reporting techniques
Alan Manifold
 
A Matter Of Form: Access Forms to make reporting a snap (or a click)
A Matter Of Form: Access Forms to make reporting a snap (or a click)A Matter Of Form: Access Forms to make reporting a snap (or a click)
A Matter Of Form: Access Forms to make reporting a snap (or a click)
Alan Manifold
 
Using Indexed field effectively in Access Queries with Voyager
Using Indexed field effectively in Access Queries with VoyagerUsing Indexed field effectively in Access Queries with Voyager
Using Indexed field effectively in Access Queries with Voyager
Alan Manifold
 
Breaking the Google Addiction
Breaking the Google AddictionBreaking the Google Addiction
Breaking the Google Addiction
Alan Manifold
 
An Abecedary of Access Tips with the Voyager Integrated Library System
An Abecedary of Access Tips with the Voyager Integrated Library SystemAn Abecedary of Access Tips with the Voyager Integrated Library System
An Abecedary of Access Tips with the Voyager Integrated Library System
Alan Manifold
 
The Challenge of Bahá’u’lláh’s Revelation
The Challenge of Bahá’u’lláh’s RevelationThe Challenge of Bahá’u’lláh’s Revelation
The Challenge of Bahá’u’lláh’s Revelation
Alan Manifold
 

More from Alan Manifold (13)

Photo retrospective of the life of Rosemary Manifold
Photo retrospective of the life of Rosemary ManifoldPhoto retrospective of the life of Rosemary Manifold
Photo retrospective of the life of Rosemary Manifold
 
What Were Once Habits Are Now Vices
What Were Once Habits Are Now VicesWhat Were Once Habits Are Now Vices
What Were Once Habits Are Now Vices
 
Why I Hope ENCompass Continues to Fail
Why I Hope ENCompass Continues to FailWhy I Hope ENCompass Continues to Fail
Why I Hope ENCompass Continues to Fail
 
Queer Buy for the Straight Li-brary (Endeavor's ENCompass)
Queer Buy for the Straight Li-brary (Endeavor's ENCompass)Queer Buy for the Straight Li-brary (Endeavor's ENCompass)
Queer Buy for the Straight Li-brary (Endeavor's ENCompass)
 
DigiTool API Project
DigiTool API ProjectDigiTool API Project
DigiTool API Project
 
Evolution of Libraries and Metadata
Evolution of Libraries and MetadataEvolution of Libraries and Metadata
Evolution of Libraries and Metadata
 
Buried Treasure: Finding Reporting Gold in the Voyager Tables (using Microsof...
Buried Treasure: Finding Reporting Gold in the Voyager Tables (using Microsof...Buried Treasure: Finding Reporting Gold in the Voyager Tables (using Microsof...
Buried Treasure: Finding Reporting Gold in the Voyager Tables (using Microsof...
 
Art - advanced reporting techniques
Art - advanced reporting techniquesArt - advanced reporting techniques
Art - advanced reporting techniques
 
A Matter Of Form: Access Forms to make reporting a snap (or a click)
A Matter Of Form: Access Forms to make reporting a snap (or a click)A Matter Of Form: Access Forms to make reporting a snap (or a click)
A Matter Of Form: Access Forms to make reporting a snap (or a click)
 
Using Indexed field effectively in Access Queries with Voyager
Using Indexed field effectively in Access Queries with VoyagerUsing Indexed field effectively in Access Queries with Voyager
Using Indexed field effectively in Access Queries with Voyager
 
Breaking the Google Addiction
Breaking the Google AddictionBreaking the Google Addiction
Breaking the Google Addiction
 
An Abecedary of Access Tips with the Voyager Integrated Library System
An Abecedary of Access Tips with the Voyager Integrated Library SystemAn Abecedary of Access Tips with the Voyager Integrated Library System
An Abecedary of Access Tips with the Voyager Integrated Library System
 
The Challenge of Bahá’u’lláh’s Revelation
The Challenge of Bahá’u’lláh’s RevelationThe Challenge of Bahá’u’lláh’s Revelation
The Challenge of Bahá’u’lláh’s Revelation
 

Recently uploaded

Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 

Recently uploaded (20)

Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 

One More Thing: Tweaking and Embellishing Access Queries

  • 1. “JUST ONE MORE THING”: Tweaking and Embellishing Access Queries episode produced by: Alan Manifold Systems Implementation Manager Purdue University Libraries manifold@purdue.edu starring: Microsoft Access
  • 2. THE PROBLEM There are always new things to add There are always new queries to write Many queries are actually wrong Like good detectives, we have to keep going back until we get everything nailed down.
  • 3. QUERY MAINTENANCE Because you keep going back to queries, make them easy to maintain. Which of these would you rather tweak? They do the same thing, but the bottom one is much easier to follow.
  • 4. FLEXIBILITY Seize every chance to make your queries more flexible. • Hard-code as little as possible • Use prompts for criteria • Permit a wide range of criteria • Include intermediate tables
  • 5. FIRST: ANALYZE QUERY It is foolhardy to start tweaking a query if you don’t really know what it does. If it’s one of your queries, you have a headstart.
  • 6. BE THE MACHINE Talk yourself through the query. “Each bib is linked to its line item. If we don’t have an order, the bib will be dropped. We link each line item to a subscription. If it’s a monograph, there won’t be one, so the results will only include serials and continuations.”
  • 7. KEEP TALKING “Each subscription is linked to a component, and each component is linked through the COMPONENT_PATTERN table to the pattern defined for that component. So, we end up with each serial we receive being linked to the associated pattern.”
  • 8. NOW THE BOTTOM PART “We have a list of each bib record linked with its pattern. Now, we grab the BIB_ID and TITLE from one end and the pattern’s name from the other. So, for each serial that has a subscription (current or ceased) and a component, we will see the title, along with the name of the pattern we’re using to receive it.”
  • 9. TWEAK ONLY NOW Now that you understand the current query, you can consider adding to it. “I’d like to find all of our serials that come more frequently than once a month. The frequency should be associated with the pattern, so this query should be a good place to start. I will need to locate the frequency information, then add criteria that will screen out the monthlies and less frequent patterns.” Frequency > “Once a Month”
  • 10. LOOK AT THE TABLES!!! You want specific frequencies, but you need to know how that information is stored. The ONLY WAY is to look at the tables themselves.
  • 11. SOMETHING’S MISSING The PATTERN table says this: Acq says this: “There must be a key somewhere! I’ll look at more tables.”
  • 12. WHAT’S IT CALLED? “Pattern— something? No, there doesn’t seem to be one. How about Frequency— something? BINGO!”
  • 13. LOOK AT THE TABLE!!! You could specify: Frequencies (e.g. “Semiweekly”, “Daily”), Codes (e.g. “c”, “d”, “e”, “w”) or you could just check for FREQ_CALC_TYPE = “d”. WHAT WILL BE EASIEST TO MAINTAIN?
  • 14. ADDING A TABLE To add a table to an existing query, open the query, and find the icon in the toolbar for “Add Table”
  • 15. TEST THE QUERY Do a test run to see if: * All of the returned results make sense * All expected records are returned
  • 16. WHAT DID WE JUST DO? Analyze one or more queries Know what you need to change Find the tables and fields you will need Make changes, one at a time Test the query with each change The same process applies to your own queries, queries from elsewhere or the prepackaged queries.
  • 17. JOIN SIDE EFFECTS Joining tables often results in more or fewer records in the results. More… One record per bib One record per MFHD
  • 18. JOIN SIDE EFFECTS Only patron barcodes with proxies All patron barcodes Less…
  • 19. ADDING AND DELETING If you don’t know how a new table will affect a query, test! 1489143 2210175 Why?
  • 20. CRITERIA ISSUES Placement and appropriateness Operators: comparison, Boolean, Between Pattern matching Prompting Dates and criteria Criteria with grouping
  • 21. CRITERIA PLACEMENT Put criteria on the “Criteria” line under the field to which they apply.
  • 22. APPROPRIATE CRITERIA Be sure your criteria make sense with the actual values in the field you are using them with. Run the query without criteria to see what the values are. This one won’t work as is.
  • 23. CRITERIA & OPERATORS Add operators to specify more complex criteria than simple equality. Boolean: And Or Not Comparison: <> < > <= >= Between: Between 5 And 10 Between #6/4# And #6/5# Combined: >10 And <15 <> “this” And <> “that” “VHS” or “CD-ROM”
  • 24. PATTERN MATCHING With text fields, you can do pattern matching, using the asterisk as a wildcard. Anything that ends with “s” Anything that starts with “GP” Call number has “PER” anywhere in it.
  • 25. PROMPT FOR CRITERIA Make your queries more flexible by using prompts instead of hard-coding the criteria. When you add a prompt, make sure it clearly asks for what it wants. What does “start” want?
  • 26. DATES AND CRITERIA All Date fields in Voyager are Date/Time fields, which affects your criteria. #02/14/2004# = #02/14/2004 00:00:00# ≠ #03/06/2003# = #03/06/2003 00:00:00# ≠ #02/14/2004# = #02/14/2004 00:00:00# ≠ #02/14/2004# = #02/14/2004 00:00:00# ≠ #02/15/2004# = #02/15/2004 00:00:00# ≠ #09/20/2002# = #09/20/2002 00:00:00# ≠ #02/15/2004# = #02/15/2004 00:00:00# ≠ #12/04/2003# = #12/04/2003 00:00:00# ≠ #02/15/2004# = #02/15/2004 00:00:00# ≠ #02/15/2004# = #02/15/2004 00:00:00# ≠ Date constants without times are that date at exactly midnight.
  • 27. DATE RANGES Between #6/4/2004# And #6/5/2004# 4 June 2004 5 June 2004 One day’s data, from one midnight to the next. 16 816 16 16 16 16 16 0/24 0/24 0/24 0/24 0/24 0/24 0/24
  • 28. EXPRESSIONS Using expressions expands the range of values that can be returned. An expression is any transformation of current values into new values. Extract the 7th single character from the 008 field and check if it’s a “c”.
  • 29. MORE EXPRESSIONS Add charges and browses, numerically Convert title to upper case before doing case sensitive comparison Change date to a day name to match input criteria Convert a monetary amount to dollars and cents
  • 30. QUESTIONS? If we have time, I can work through one or more examples.