Upload
anthony-douglas
View
225
Download
0
Embed Size (px)
Citation preview
1
Access for non-experts
• Link tables• Find fields• Criteria• Join tables• Find missing comment lines• Understand relational databases (Wow!)
2
Link tables
• Create new mdb• New, Link Table• Files of Type = ODBC• Machine Data Source• Gblware32
• Access 2007 – External Data, More, ODBC...
3
Link tables
• Login as GLOBAL, WARE• Check Save Password (maybe)• Select the tables
4
Link Tables
5
Which tables?
• Invoice• Segments or TrueOD• Comments• AccountId
• What if you don't know where the data is?• Print DB Structure, print to file, RTF format• Open in Word and search
6
7
Unique Record Identifer
• Very important to pick the right one or ones• Some tables have multiple fields • Print DB structure tells you
• What if you don't know where the data is?• Print DB Structure, print to file, RTF format• Open in Word and search
8
Query the tables
• New query• Add table or tables• Select fields
• Criteria • Always use criteria except on small tables• Date range; status <> V• Use indexed fields• Invoice Query shows most
9
Create a query
• New, Design View• Add table• Select fields• Specify criteria
10
Create a query
• New, Design View• Add table• Select fields• Specify criteria
11
Create a query
• Prompt text in square brackets• Query, Parameters
• not required but good for dates• Validates entry
12
Joining tables
• Need data from another table• Add table• Join the table
• Access will join automatically if it can• May need to delete and rejoin
• Select fields
13
Joining tables
Both Provider name and Account Id name in the quey
• Add AccountID table twice• Join one from Invoice provider, one from Invoice Account Id• Select Name from each, rename at least one of them
14
• New, Design View• Add table• Select fields• Specify criteria
15
Inner vs Outer join
• Inner join – data always in both tables• Outer join – data may not be in one of the tables
• Account Id• The invoice account Id always has a matching record in Account ID table• The invoice booking agent may or may not have a matching record
• Inner joins are faster so use them if you are sure
16
Inner vs Outer join
• Inner join (#1)
• Outer join (#2 if "big" table is 1st)
17
Inner vs Outer join
18
Find missing data
• Outer join – data may not be in one of the tables• Agent name was blank• These agents do not have employee Account Ids
• Sort by this field• Or, specify this field is not present ( "is null" )
19
Find missing comment line
• Trickier – but very useful• Issue – entire record is missing
20
Find missing comment line
1. Create a query for line 4
21
Find missing comment line
2. Add that query to your main query
22
Find missing comment line
3. Outer join that query to your main query
4. Add Data field to query and sort or specify IS NULL
23
Find missing comment line
24
Relational Database
• One to one• The account Id in Invoice has one matching (associated) record in Account Id
• One to many• An air item in Invoice has one or more matching (associated) records in
Segments
25
Relational Database
Segment report with Commission
1. New query with Segment table
2. Add Invoice table, join, add commission fields
26
Relational Database
Segment report with Commission - results
27
Relational Database
Segment report with Commission – results
• 203.72 + 268.86 = 472.56• 23.63 + 23.63 + 23.63 + 23.63 = 94.52
28
Relational Database
Segment report with Commission
• Calculate the commission per segment• New field with a name and the formula
29
• 10.186 + 13.442 = 23.628
30
Copyright
Copyright
©2010 Travelport Inc. All rights reserved. All Travelport logos and marks as well as all other Travelport proprietary materials depicted herein are the property of Travelport Inc. and/or its affiliates.
Notes About Examples
All screen examples and other inserts associated with system output are provided for illustration purposes only. They are
provided as illustrative examples of system functionality and are not meant to represent actual screen responses, rates,
etc.