3700sql Man
3700sql Man
Copyright 2000
MICROS Systems, Inc.
Beltsville, MD USA
All Rights Reserved
Declarations
:DUUDQWLHV
Although the best efforts are made to ensure that the information in this manual is
complete and correct, MICROS Systems, Inc. makes no warranty of any kind with
regard to this material, including but not limited to the implied warranties of
marketability and fitness for a particular purpose. Information in this manual is
subject to change without notice. No part of this manual may be reproduced or
transmitted in any form or by any means, electronic or mechanical, including
photocopying, recording, or information recording and retrieval systems, for any
purpose other than for personal use, without the express written permission of
MICROS Systems, Inc.
MICROS Systems, Inc. shall not be liable for errors contained herein or for
incidental or consequential damages in connection with the furnishing,
performance, or use of this manual.
7UDGHPDUNV
CorelDraw is a registered trademark of Corel Corporation.
Crystal Reports is a registered trademark of Crystal Computer Services, Inc.
FrameMaker is a registered trademark of Adobe Corporation.
Microsoft, Microsoft Excel, Win32, Windows, and Windows NT are either registered trademarks or
trademarks of Microsoft Corporation in the U.S. and/or other countries.
Sybase SQL Anywhere is a registered trademark of Sybase Inc.
Visio is a registered trademark of Visio Corporation.
Windows95 is a registered trademark of Microsoft in the U.S. and other countries.
'HVLJQDQG3URGXFWLRQ
This manual was written with FrameMaker 5.0 for Windows. Some illustrations
and diagrams were designed in CorelDraw and/or Visio.
3ULQWLQJ+LVWRU\
New editions of this manual incorporate new and changed material since the
previous edition. Minor corrections and updates may be incorporated into reprints
of the current edition without changing the publication date or the edition number.
Software Version
Product
Edition Month Year 3700
Management
LL
Table of Contents
Preface
Welcome to the SQL / Database Access Manual ............................................. vi
Conventions & Symbols ................................................................................... ix
Reader Response............................................................................................... x
Chapter 6: Views
What are Views?............................................................................................... 6-2
Using Views...................................................................................................... 6-3
3700 Views ....................................................................................................... 6-4
64/'DWDEDVH$FFHVV LLL
7DEOHRI&RQWHQWV
Index
LY
Preface
In this preface, you will find information about this manual. Refer to the
preface if you have any questions about the organization, conventions, or
contents of this manual.
In this preface
Welcome to the SQL / Database Access Manual ..................................... vi
Conventions & Symbols...........................................................................ix
Reader Response .......................................................................................x
64/'DWDEDVH$FFHVV Y
3UHIDFH
:HOFRPHWRWKH64/'DWDEDVH$FFHVV0DQXDO
+RZ7KLV0DQXDOLV2UJDQL]HG
&KDSWHU,QWURGXFWLRQWRWKH'DWDEDVH
In this first section, you will find a brief, general introduction to the 3700
database. This section provides an overview of database concepts and
describes the 3700 database structure.
&KDSWHU&RQQHFWLQJWRWKH'DWDEDVH
This section describes how to connect to a database server via ODBC and
how to configure the database engine.
&KDSWHU'DWDEDVH0DQDJHPHQW8WLOLWLHV
This section describes how ISQL and SQL Central may be used to
manage an SQL Anywhere database.
&KDSWHU$FFHVVLQJWKH'DWDEDVH
This section provides examples of how to access the 3700 database from
the following applications:
q Crystal Reports
q Microsoft® Excel
&KDSWHUGDWDEDVH7DEOHVDQG5(6
This section describes how the 3700 database tables relate to what you see
in the POS Configurator module.
&KDSWHU9LHZV
This section introduces Views and describes how they are used with the
3700 database.
&KDSWHU6WRUHG3URFHGXUHV
This section contains an overview of Stored Procedures and describes
how they are used with the 3700 database.
&KDSWHU'RPDLQ'DWDW\SHV
In this section, you will find a description of the Domains and SQL data
types that have been defined for the 3700 database.
&KDSWHU'DWDEDVH7DEOHV
YL
3UHIDFH
:HOFRPHWRWKH64/'DWDEDVH$FFHVV0DQXDO
This section contains the following information for each 3700 database
table:
q Logical Column Name(s)
q Physical Column Name(s)
q Datatype for each Column
q Primary Key
q Foreign Key
q Alternate Keys
q Null Option
:KR6KRXOG8VH7KLVPDQXDO"
This manual is intended for use by:
q MICROS Installers/Programmers
q MICROS Dealers
q MICROS Customer Service
q MICROS Training Personnel
q MIS Personnel
This manual assumes that you have the following knowledge or expertise:
q Working knowledge of the Windows interface.
q Operational understanding of PCs.
q Understanding of basic network concepts.
q Experience with Windows; especially with Windows 95 and
Windows NT.
q Basic knowledge of relational database concepts.
q Understanding of POS terminology and concepts.
q Exposure to a MICROS POS system (2400, 2700, 4700, 8700) or
other POS; preferably experience programming 2700 systems.
64/'DWDEDVH$FFHVV YLL
3UHIDFH
:HOFRPHWRWKH64/'DWDEDVH$FFHVV0DQXDO
5HODWHG0DQXDOV
This section provides a list of the related MICROS documentation as well
as a list of suggested reading materials.
MICROS Documentation
The 3700 Restaurant Enterprise Series library includes:
q 3700 Administration Applications Manual 100134-503
q 3700 Custom Reports Design Manual 100134-508
q 3700 Feature Quick Reference Manual 100134-506
q 3700 Feature Reference Manual 100134-501
q 3700 Hardware Installation Guide 100134-514
q 3700 Hardware User’s Maintenance Guide 100134-512
q PC Workstation Model 32 Setup Guide 100016-085
q 3700 Reports Manual 100134-511
q 3700 Site Preparation Guide 100134-513
q 3700 Site Survey Manual 100134-505
q 3700 SQL / Database Access Manual 100134-507
q 3700 POS Configurator User’s Guide 100134-504
q 3700 System Interface Module User’s Guide 100134-516
q 3700 User’s Manual 100134-502
Suggested Reading
q Crystal Reports documentation
q Microsoft Windows 95 Resource Kit
q Sybase SQL Anywhere documentation
YLLL
3UHIDFH
&RQYHQWLRQV 6\PEROV
&RQYHQWLRQV
The following conventions are used throughout this manual.
Convention Meaning
6\PEROV
The following symbols are used throughout this manual.
Note
This symbol is used to bring special attention to a related
feature.
Tip
This symbol is used to point out suggestions that can save you
time and difficulty.
64/'DWDEDVH$FFHVV L[
3UHIDFH
5HDGHU5HVSRQVH
Reader Response
As you read this, the documentation staff at MICROS is hard at work
preparing the next edition of this manual. Your feedback could be
instrumental in changing that next edition.
7HOOXVZKDW\RXWKLQN³ZH·GOLNHWRKHDUIURP\RX
We are very interested in hearing from you about:
q Good ideas -
Tell us about some part of this manual that you think works well–
we’ll be sure to maintain it.
q Ideas that need work -
Tell us about an area that needs to be improved– we’ll punch it up.
q Information not included -
Did we miss something? Let us know so we can add it.
q Information that’s not clear -
Did you find something hard to follow? We’ll rethink it and rewrite it.
q Information that’s not correct -
Did something get past our arduous tech edit process? Help us fix it.
+RZWRUHDFKXV
3RVWDO$GGUHVV
If you can offer any criticisms or suggestions about this manual, please
mail a note or postcard to:
MICROS Systems, Inc.
7031 Columbia Gateway Drive
Columbia, MD 21046-2289 USA
Attn: Documentation Group Manager
(PDLO$GGUHVV
As an alternative, you may address criticisms and suggestions regarding
this manual by electronic mail to:
[email protected].
Please use the name of the manual as the subject line.
[
Chapter 1
In this chapter
Database Concepts .................................................................................1-2
Database System Overview................................................................... 1-5
64/'DWDEDVH$FFHVV
,QWURGXFWLRQWRWKH'DWDEDVH
'DWDEDVH&RQFHSWV
Database Concepts
This section introduces some of the basic terms and concepts that are
important in accessing the 3700 database. Note that the details of many of
these concepts are beyond the scope of this manual.
:KDWLVD'DWDEDVH"
A database is a shared, integrated collection of data. A database can be
modeled conceptually to define the way in which the database is
structured. For instance, SQL Anywhere is modeled as a relational
database.
Relational Database
In a relational database model, information is viewed in sets of tables.
Each table contains a fixed number of columns and a variable number of
rows.
Each column can contain values which are dependent on a domain (or
datatype). A domain defines the set of allowable values for a particular
column.
Keys
Keys are columns that help to uniquely identify specific rows in a table
and define relationships between tables. There are three types of keys:
primary, foreign, and alternate.
3ULPDU\.H\
A primary key is any column or set of columns where the values uniquely
identify a row in the table. In the 3700 database, most tables have a
column for a sequence number. This sequence number is the primary key
and can not be modified using the POS Configurator module.
,QWURGXFWLRQWRWKH'DWDEDVH
'DWDEDVH&RQFHSWV
)RUHLJQ.H\
A foreign key defines the relationships between database tables. A
foreign key in one table contains a value corresponding to the primary key
of another table. For instance, in the 3700 database, a relationship has
been defined between the Employee Class and Employee tables. The
Employee table contains the Employee Class Sequence column which is a
foreign key to the Employee Class Sequence column in the Employee
Class table.
In the 3700 database, privileges are defined for Employee Classes and are
extended to each employee who is a member of a particular Employee
Class. In the diagram above, the employee Paul is a member of the
Kitchen Staff class. Therefore, Paul will be extended the privileges that
have been assigned to the Kitchen Staff class.
When the foreign key of a table contains the same values as the primary
key of another table, there is referential integrity. Referential integrity
ensures that database information remains accurate and usable. In the
above example, the employee Paul is a member of the Kitchen Staff class.
Since referential integrity exists between the Employee Class and
Employee tables, you can not delete the Kitchen Staff class while Paul is
still a member.
$OWHUQDWH.H\
An alternate key provides a way of uniquely identifying the rows in a
table in addition to the primary key. For instance, the payroll_id column
in the emp_def table is an alternate key. Since no two employees will
have the same payroll ID number, the payroll_id column is designated as
an alternate key and is therefore unique.
64/'DWDEDVH$FFHVV
,QWURGXFWLRQWRWKH'DWDEDVH
'DWDEDVH&RQFHSWV
:KDWLV64/"
Structured Query Language (SQL) is a query and programming language
that is used by many relational database systems to query, update, and
manage databases.
Although the exact syntax may vary from vendor to vendor, the basic
concepts and structures for SQL are the same. For detailed information
about using SQL commands to access a database, refer to your Sybase
SQL Anywhere User’s Guide.
:KDWLV&OLHQW6HUYHU&RPSXWLQJ"
Client/Server computing is a form of distributed processing in which a
computer acts as a Server, providing database, application, and systems
management functionality to clients. In the 3700 environment, the Server
is the database engine, such as SQL Anywhere. The clients are
applications, such as POS Configurator or POS Operations.
The Server handles requests for data and returns only the data required to
answer the request. If the client and server are on different network nodes,
unnecessary network traffic is eliminated because only the requested data
is transferred.
In the networked client/server environment, the workload is split between
the client computers that request services, such as printing, information
retrieval, or updating of a customer account, and the server computer that
processes the request.
Two of the benefits of client/server computing are described below:
,PSURYHG3HUIRUPDQFH
Client/Server processing is based on the use of a database server, which
significantly reduces LAN traffic and improves the overall system
performance.
&HQWUDOL]HG'DWD$GPLQLVWUDWLRQ
All of the databases are managed and accessed by a central database
server. The database server is responsible for various functions, such as
data integrity, security, and backup.
,QWURGXFWLRQWRWKH'DWDEDVH
'DWDEDVH6\VWHP2YHUYLHZ
'DWDEDVH6\VWHP&RPSRQHQWV
The 3700 database system consists of the following components:
q SQL Anywhere
q Network Support (TCP/IP)
q Open Database Connectivity (ODBC) Drivers
q Borland Database Engine (BDE)
q 3700 Applications
3700 Applications
Autosequences System Manager POS
and Reports Configurator Procedures Operations
Borland Database
Borland Database Engine (BDE)
Engine (BDE)
ODBC
Administrator
ODBC Drivers ODBC Drivers Configuration
Utility
Network Support
TCP/IP
(TCP/IP) LAN
64/$Q\ZKHUH
SQL Anywhere is an SQL-based, relational database server. SQL
Anywhere can be used in a client/server environment where processing is
divided between the client and server components.
1HWZRUN6XSSRUW7&3,3
TCP/IP is an interface that allows two different processes on different
computers to communicate.
64/'DWDEDVH$FFHVV
,QWURGXFWLRQWRWKH'DWDEDVH
'DWDEDVH6\VWHP2YHUYLHZ
2SHQ'DWDEDVH&RQQHFWLYLW\2'%&
ODBC is an interface standard developed by Microsoft Corporation.
ODBC provides an interface to database management systems through
drivers provided by the database manufacturers. For instance, Sybase
supplies an ODBC driver for SQL Anywhere.
%RUODQG'DWDEDVH(QJLQH%'(
The Borland Database Engine processes the requests that are made by
certain client applications. These requests are in the form of SQL
statements, such as a SELECT statement which is used to extract
information from the database. The client application sends the SQL
statement, the database engine processes them and sends the results back
to the client application.
$SSOLFDWLRQV
The 3700 applications include any applications that access the 3700
database, such as POS Configurator.
7\SHVRI'DWDEDVH7DEOHV
The tables in the 3700 database fall into one of the following categories:
definition, status, transaction, or totals tables.
'HILQLWLRQ7DEOHV
BGHI
The definition tables define various aspects of the 3700 system, such as
menu items, employees, devices, etc. These definition tables can be
programmed using the POS Configurator module.
6WDWXV7DEOHV
BVWDWXV
The status tables are updated automatically in response to system events.
For instance, the Employee Status table contains a column (Time Clock
Status) that keeps track of when an employee clocks in or out. This table
is updated whenever an employee clocks in or out.
'HWDLO
BGWO
The detail tables contain information about POS transactions. For
instance, as POS transactions occur, the type of transaction is written to
the Transaction (trans_dtl) table.
7RWDOV
BWWO
The totals tables contain accumulated totals information that reflect
transaction activity, such as menu item sales and time period sales.
Chapter 2
In this chapter
Connection Overview.............................................................................2-2
ODBC Administrator ............................................................................ 2-3
64/'DWDEDVH$FFHVV
&RQQHFWLQJWRWKH'DWDEDVH
&RQQHFWLRQ2YHUYLHZ
Connection Overview
In order for client applications, such as POS Configurator or
Autosequences and Reports to access the 3700 database, an ODBC
connection must be established to the database and the Borland Database
Engine must be configured.
2'%&
ODBC is an interface developed by Microsoft Corporation which
provides a standard interface for connecting client applications to
database management systems. ODBC defines data sources. Each data
source description contains the parameters required for connecting to the
database. This data source can be created using the ODBC Administrator.
The ODBC interface is automatically configured during installation of the
3700 system CD-ROM. Refer to “ODBC Administrator” on page 2-3 for
information on how to manually configure the ODBC data source.
%'(
The Borland Database Engine processes the requests that are made by the
client application. These requests are in the form of SQL statements, such
as a SELECT statement which is used to extract information from the
database. The client application sends the SQL statement, the database
engine processes them and sends the results back to the client application.
The BDE is automatically configured during installation of the 3700
system CD-ROM.
&RQQHFWLQJWRWKH'DWDEDVH
2'%&$GPLQLVWUDWRU
ODBC Administrator
The ODBC Administrator allows you to define the data source required to
connect to the 3700 database. The following steps describe how to
configure the data source for 3700. Note that you must have SQL
Anywhere installed in order to configure the data source.
1. From the Start Menu, select Programs | Sybase SQL Anywhere 5.0
| ODBC Administrator. The Data Sources dialog box appears.
2. Click the Add button. The Add Data Source dialog box appears.
3. Highlight Sybase SQL Anywhere 5.0 in the Installed ODBC Drivers
box and click OK. The SQL Anywhere ODBC Configuration dialog
box appears.
4. Enter the appropriate information as shown and described below:
User ID
Password
Server Name The name assigned to the
Server PC.
64/'DWDEDVH$FFHVV
&RQQHFWLQJWRWKH'DWDEDVH
2'%&$GPLQLVWUDWRU
Chapter 3
This chapter describes how to use SQL Anywhere’s ISQL and SQL
Central utilities for database management.
In this chapter
ISQL .......................................................................................................3-2
SQL Central........................................................................................... 3-4
64/'DWDEDVH$FFHVV
'DWDEDVH0DQDJHPHQW8WLOLWLHV
,64/
ISQL
:KDWLV,64/"
Interactive Structured Query Language (ISQL) is the utility provided with
SQL Anywhere that allows you to execute SQL statements and view the
results.
6WDUWLQJ64/$Q\ZKHUH,64/
To start SQL Anywhere ISQL utility, select Programs | Sybase SQL
Anywhere 5.0 | ISQL from the Start menu. Enter the appropriate User ID
and Password. The following window displays:
Data
Window
Command
Window
'DWDEDVH0DQDJHPHQW8WLOLWLHV
,64/
'LVSOD\LQJ'DWD8VLQJ,64/
ISQL can be used to view information in the 3700 database. For instance,
to display the information that is currently in the Menu Item Definition
Table, enter the following line into the Command window and press the
Execute button.
Note
If ISQL or any other tool places an update lock on a row
without committing or rolling back, other applications
including POS Operations may stop when the locked row is
encountered. Refer to the Using Transactions and Locks
section of the Sybase SQL User’s Guide for more information.
64/'DWDEDVH$FFHVV
'DWDEDVH0DQDJHPHQW8WLOLWLHV
64/&HQWUDO
SQL Central
:KDWLV64/&HQWUDO"
SQL Central is a graphical database management tool that allows you to
view the database structure and monitor database performance.
6WDUWLQJ64/&HQWUDO
To start the SQL Central utility:
1. Select Programs | Sybase SQL Anywhere 5.0 | SQL Central from
the Start menu. The SQL Central window displays.
2. Select Tools | Connect. The SQL Anywhere Logon dialog box
displays.
3. Enter the appropriate user ID and password. The database appears in
the SQL Central window.
9LHZLQJWKH'DWDEDVH6WUXFWXUH
To examine the database structure:
1. Expand the database server that appears on the left side of the SQL
Central window.
2. Expand the 3700 database folder as shown below:
'DWDEDVH0DQDJHPHQW8WLOLWLHV
64/&HQWUDO
64/'DWDEDVH$FFHVV
'DWDEDVH0DQDJHPHQW8WLOLWLHV
64/&HQWUDO
Chapter 4
This chapter provides examples of how to access the 3700 database using
Crystal Reports and Microsoft® Excel.
In this chapter
Crystal Reports.......................................................................................4-2
Microsoft Excel ..................................................................................... 4-5
64/'DWDEDVH$FFHVV
$FFHVVLQJWKH'DWDEDVH
&U\VWDO5HSRUWV
Crystal Reports
Crystal Reports is an application by Crystal Computer Services, Inc. that
allows you to create custom reports using information stored in the 3700
database. Crystal Reports Professional is required to create custom
reports.
MICROS will set all standard reports at object number 9999 and below.
Any custom reports should be given an object number above 9999. This
will ensure that MICROS can add changes to reports without overwriting
a custom report
The following steps provide an example of how to create a custom report.
Refer to the 3700 Custom Reports Design Manual for more details on
how to create custom reports.
1. Select File | New | Standard Expert from Crystal Reports. The
Create Report Expert appears.
2. Click the SQL/ODBC button. The Choose SQL Table dialog box
appears.
3. Highlight the database view or table that you would like to use in
creating the report and click the Add button.
Example: v_R_sys_menuitem
4. Repeat Step 3 for each view or table you would like to use in
reporting.
5. Click the Done button from the Choose SQL Table dialog box. The
Step 1:Tables tab appears.
6. Click the Next button. The Step 2:Fields tab appears.
$FFHVVLQJWKH'DWDEDVH
&U\VWDO5HSRUWV
7. Highlight the database field and click the Add button for each field
that you would like to appear in the report. The selected fields appear
in the Report Fields box as shown below:
10. Select the appropriate sort order from the Order drop-box and click
the Next button. The Step 4:Total tab appears.
Example: in ascending order
11. Select the fields to subtotal, count, etc. and click the Next button. The
Step 5:Select tab appears.
Example: P1_sales_qty (sum), P1_sales_total (sum)
12. Select the fields and filter options as desired and click the Next
button. The Step 6:Style tab appears.
13. Enter the report title, select the desired report style, and click the
Preview Report button.
Example: Report Example (Title), Leading Break (Style)
64/'DWDEDVH$FFHVV
$FFHVVLQJWKH'DWDEDVH
&U\VWDO5HSRUWV
14. The report template is created, the report is generated and displayed
as shown below.
Note
Refer to the 3700 Custom Reports Design Manual for more
information on creating custom reports.
$FFHVVLQJWKH'DWDEDVH
0LFURVRIW([FHO
Microsoft Excel
The information stored in the 3700 database can be accessed from
Microsoft® Excel by using the XLODBC and Microsoft Query add-in
programs. These add-in programs allow you to use Microsoft Query to
select the tables and columns that you wish to bring into Excel. Once the
tables and columns are selected, the information can be returned to the
desired cells in Excel.
The following steps describe how to use the Excel add-in programs to
bring information into Microsoft Excel from the 3700 database. Note that
you must have the XLODBC and Microsoft Query add-ins loaded to
complete this procedure.
1. Select Data | Get External Data from Microsoft Excel. The
Microsoft Query application is started and the Select Data Source
dialog box appears.
2. Highlight the 3700 data source and click the Use button. The Add
Tables dialog box appears.
3. Highlight the database table that you would like to access and click
the Add button. The selected database table and its columns appears
at the top of the Microsoft Query screen.
4. Repeat Step 3 for each table you would like to access.
5. Click the Close button from the Add Tables dialog box.
6. The selected tables appear as shown below:
64/'DWDEDVH$FFHVV
$FFHVVLQJWKH'DWDEDVH
0LFURVRIW([FHO
7. Select the desired columns from the tables that appear at the top of the
Microsoft Query screen. The contents of the columns appear at the
bottom of the screen as shown below:
Chapter 5
In this chapter
Overview ................................................................................................5-2
POS Configurator Folders..................................................................... 5-3
Adding Changes to the MICROS Database ........................................ 5-14
Converting Custom Changes............................................................... 5-15
64/'DWDEDVH$FFHVV
'DWDEDVH7DEOHVDQG5(6
2YHUYLHZ
Overview
POS Configurator, Enterprise Configurator, and Enterprise Office Main
Monitors are software applications which allow you to easily program the
database by adding, updating, and deleting information stored in the
database. For instance, with POS Configurator you can program hardware
configurations, employee information, menu items, and other POS related
information. Enterprise Configurator allows you to define store locations,
price tiers, and enterprise level information. Enterprise Office allows you
to keep track of inventory, recipes, and order information.
Refer to the Online Help for POS Configurator or the POS Configurator
User’s Guide for detailed information about the POS Configurator
module.
'DWDEDVH7DEOHVDQG5(6
326&RQILJXUDWRU)ROGHUV
Folder
Tab
The following sections contain tables which describe each of the POS
Configurator folders and how they relate to what is stored in the database.
The following is an example of the tables that appear in the following
sections.
The POS
and the POS Configurator tab updates the database table
Configurator form
64/'DWDEDVH$FFHVV
'DWDEDVH7DEOHVDQG5(6
326&RQILJXUDWRU)ROGHUV
Note that the Logical (Menu Item Type Class Definition) and Physical
(mi_type_class_def) names are listed for the database table being
updated.
6DOHV)ROGHU
The Sales folder allows you to update the sales-related tables in the
database. The POS Configurator Sales folder is shown below:
The following table shows how the POS Configurator Sales folder
corresponds to the database.
The POS
and the POS Configurator tab updates the database Table
Configurator form
'DWDEDVH7DEOHVDQG5(6
326&RQILJXUDWRU)ROGHUV
The POS
and the POS Configurator tab updates the database Table
Configurator form
64/'DWDEDVH$FFHVV
'DWDEDVH7DEOHVDQG5(6
326&RQILJXUDWRU)ROGHUV
The POS
and the POS Configurator tab updates the database Table
Configurator form
(PSOR\HHV
The Employees folder allows you to update the employee-related tables in
the database. The POS Configurator Employees folder is shown below:
The following table shows how the POS Configurator Employees folder
corresponds to the database.
'DWDEDVH7DEOHVDQG5(6
326&RQILJXUDWRU)ROGHUV
'HYLFHV
The Devices folder allows you to update the hardware-related tables in
the database. The POS Configurator Devices folder is shown below:
The following table shows how the POS Configurator Devices folder
corresponds to the database.
The POS
and the POS Configurator tab updates the database Table
Configurator form
64/'DWDEDVH$FFHVV
'DWDEDVH7DEOHVDQG5(6
326&RQILJXUDWRU)ROGHUV
The POS
and the POS Configurator tab updates the database Table
Configurator form
'DWDEDVH7DEOHVDQG5(6
326&RQILJXUDWRU)ROGHUV
5HYHQXH&HQWHU
The Revenue Center folder allows you to update the Revenue Center
characteristics of the database. The POS Configurator Revenue Center
folder is shown below:
The following table shows how the POS Configurator Revenue Center
folder corresponds to the database:
The POS
and the POS Configurator tab updates the database Table
Configurator form
64/'DWDEDVH$FFHVV
'DWDEDVH7DEOHVDQG5(6
326&RQILJXUDWRU)ROGHUV
The POS
and the POS Configurator tab updates the database Table
Configurator form
6\VWHP
The System folder allows you to update the system-wide characteristics
of the database. The POS Configurator System folder is shown below:
The following table shows how the POS Configurator System folder
corresponds to the database:
The POS
and the POS Configurator tab updates the database Table
Configurator form
'DWDEDVH7DEOHVDQG5(6
326&RQILJXUDWRU)ROGHUV
The POS
and the POS Configurator tab updates the database Table
Configurator form
64/'DWDEDVH$FFHVV
'DWDEDVH7DEOHVDQG5(6
326&RQILJXUDWRU)ROGHUV
5HSRUWLQJ
The Reporting folder allows you to update the report-related features of
the database. The POS Configurator Reporting folder is shown below:
The following table shows how the POS Configurator Reporting folder
corresponds to the database:
The POS
and the POS Configurator tab updates the database Table
Configurator form
'DWDEDVH7DEOHVDQG5(6
326&RQILJXUDWRU)ROGHUV
The POS
and the POS Configurator tab updates the database Table
Configurator form
64/'DWDEDVH$FFHVV
'DWDEDVH7DEOHVDQG5(6
$GGLQJ&KDQJHVWRWKH0,&526'DWDEDVH
&XVWRP8VHU
In version 1.02 and later, a custom user is available for making custom
changes to the database. This user is a member of the
DEFINITION_GROUP, and has the same privileges as applications such
as POS Configurator.
The custom user (password: “custom”) has resource permission. This
allows it to create its own database objects: tables, stored procedures,
views and triggers for custom tables. In addition to resource permission,
this user has permission to read all tables and to insert, delete, and update
all definition tables. For more detailed information about permissions for
this user, refer to SQL Central.
5HVWULFWLRQV
Be aware of these restrictions when making custom changes:
q No changes can be made to MICROS-owned objects. The custom
user is only able to modify its own objects.
q Foreign keys cannot be added that reference MICROS- owned tables.
Any relationship to a MICROS table needs to be implied. That
relationship cannot be formed with a foreign key. Data integrity for
inserts and updates to a custom table can be handled via triggers on
that table.
q Conversion is not automatic. Special conversion scripts must be
created (as documented below).
&XVWRP6WRUHG3URFHGXUHV
Custom stored procedures can be included in autosequences.
All rows with object numbers above 10,000 are available for custom use
in the stored_proc_def table. By inserting a row in this table for the
custom stored procedure, that procedure can be setup to run in an
autosequence. When adding rows to this table, the name of the procedure
should be qualified with the owner name (i.e.,
custom.sp_ReserveRoom()).
'DWDEDVH7DEOHVDQG5(6
&RQYHUWLQJ&XVWRP&KDQJHV
([WUDFWLQJ,QIRUPDWLRQ
Create a sql file script to unload the data from the old database. Place the
script in a directory such as 3700\sql\custom. For the purposes of this
example, the sql script will be called preconv.sql.
Below is an example of a preconv.sql script used to unload data:
SELECT room_num, name, capacity
FROM custom.conference_room_def;
OUTPUT TO conference_room_def.dat;
64/'DWDEDVH$FFHVV
'DWDEDVH7DEOHVDQG5(6
&RQYHUWLQJ&XVWRP&KDQJHV
%SQLANY%\win32\isql -c "uid=custom;pwd=custom;dbn=mi-
crosold;dbf=%RESDBDIR%\microsold.db;
start=dbeng50" %RESDBDIR%\custom\preconv.sql
Place this batch file in the 3700\scripts directory. This will automatically
be run by the dbconverter.
Note that the %SQLANY% and %RESDBDIR% environment variables
are created during MICROS setup.
&UHDWLQJ2EMHFWVDQG/RDGLQJ'DWDLQWRWKH1HZ'DWDEDVH
The next step in setting up a custom conversion is creating a sql script to
create custom objects and load data into the new database. For the
purposes of this example, the script will be called postconv.sql.
Create the postconv.sql script to recreate the custom database objects in
the new database.
%% Create custom tables and stored procedures.
'DWDEDVH7DEOHVDQG5(6
&RQYHUWLQJ&XVWRP&KDQJHV
BEGIN
SELECT max_capacity
INTO @max_capacity
FROM custom.conference_room_def;
END;
64/'DWDEDVH$FFHVV
'DWDEDVH7DEOHVDQG5(6
&RQYHUWLQJ&XVWRP&KDQJHV
Once these scripts are created, they are automatically detected on all
subsequent conversions.
Chapter 6
Views
This chapter provides an introduction to views and describes how they are
used in the 3700 environment.
In this chapter
What are Views?.....................................................................................6-2
Using Views .......................................................................................... 6-3
3700 Views............................................................................................ 6-4
64/'DWDEDVH$FFHVV
9LHZV
:KDWDUH9LHZV"
9LHZV
8VLQJ9LHZV
Using Views
A view is created using the CREATE VIEW command. This CREATE
VIEW command allows you to define a table, known as a view, and store
the results of a SELECT statement in the database under a view name.
The following is an example 3700 database view.
This example creates a view using the System Definition, System Status,
Major Group Definition, and Daily System Major Group Total tables.
Refer to the Sybase SQL Anywhere User’s Guide for detailed information
on using views.
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
3700 Views
The 3700 database views can be categorized according to their purpose.
Some views are used internally by POS Operations. Other views are used
for creating reports.
9LHZVIRU5HSRUWV
In the 3700 System, views are used by the Crystal Reports templates to
generate reports. When a 3700 report is run, the appropriate stored
procedure is called by Crystal Reports. The stored procedure updates the
totals that will be used by the report. Once the totals have been updated,
the Crystal Reports template reads the rows that have been defined in the
view and generates the report.
Stored Procedure
Document
Document
3700 Report
Refer to the 3700 Custom Reports Design manual for more information
on how views are used by 3700 report templates.
9LHZV
9LHZV
The information below is listed for each of the report views in the
following sections.
q Purpose of the view
q Tables and columns used to create the view
q Stored procedure that updates the totals used by the view
q Report name and report template that uses the view
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5BFDVKLHU
The v_R_cashier view provides financial information for each cashier,
such as net sales totals and check activity.
7DEOHV&ROXPQV The tables and columns used to create the v_R_cashier view are listed
below:
Tables Columns
6WRUHG3URFHGXUH sp_R_cashier
5HSRUWV The v_R_cashier view is used to create the following reports:
9LHZV
9LHZV
YB5BFDVKLHUBWUN
The v_R_cashier_trk view provides financial information for each
cashier, based on the tracking groups defined.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_cashier_trk view are listed
below:
Tables Columns
6WRUHG3URFHGXUH
sp_R_cashier_sales_tracking
5HSRUWV The v_R_cashier_trk view is used to create the following reports:
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5B&&%DWFK
The v_R_CCBatch view provides credit card and credit authorization
information.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_CCBatch view are listed
below:
Tables Columns
6WRUHG3URFHGXUH
This view does not use any totals tables and therefore does not require a
stored procedure.
9LHZV
9LHZV
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5B&&%DWFKB;IHUB6WDWXV
The v_R_CCBatch_Xfer_Status view provides status information for
each credit card batch transfer.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_CCBatch_Xfer_Status
view are listed below:
Tables Columns
6WRUHG3URFHGXUH
This view does not use any totals tables and therefore does not require a
stored procedure.
5HSRUWV The v_R_CCBatch_Xfer_Status view is used to create the following
reports:
9LHZV
9LHZV
YB5BHPSOR\HH
The v_R_employee view provides sales and tip information for each
employee, such as net sales and charged tips.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_employee view are listed
below:
Tables Columns
6WRUHG3URFHGXUH
sp_R_employee
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
9LHZV
9LHZV
YB5BHPSOR\HHBMREBFRGH
The v_R_employee_job_code view provides job information for each
employee, such as regular and overtime work hours.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_employee_job_code view
are listed below:
Tables Columns
6WRUHG3URFHGXUH
sp_R_employee_job_code
5HSRUWV The v_R_employee_job_code view is used to create the following
reports:
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5BHPSOR\HHBVDOHVBWLSV
The v_R_employee_sales_tips view provides sales and tip information
for each employee, such as net sales and charged tips.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_employee_sales_tips view
are listed below:
Tables Columns
6WRUHG3URFHGXUH
sp_R_employee
9LHZV
9LHZV
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5BHPSOR\HHBWLPHBFDUG
The v_R_employee_time_card view is used to create the Employee Time
Reports.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_employee_time_card view
are listed below:
Tables Columns
Restaurant bus_day__start_tm
(rest_def)
6WRUHG3URFHGXUH
sp_R_time_card_ttls
9LHZV
9LHZV
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5BHPSOR\HHBWLPHBFDUGBVWDWXV
The v_R_employee_time_card_status view is used to create the
Employee Time Reports.
7DEOHV&ROXPQV
The tables and columns used to create the
v_R_employee_time_card_status view are listed below:
Tables Columns
6WRUHG3URFHGXUH
This view does not use any totals tables and therefore does not require a
stored procedure.
5HSRUWV The v_R_employee_time_card_status view is used to create the following
reports:
9LHZV
9LHZV
YB5BHPSOR\HHBWUN
The v_R_employee_trk view provides tracking total information for each
employee.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_employee_trk view are
listed below:
Tables Columns
6WRUHG3URFHGXUH
sp_R_employee_sales_tracking
5HSRUWV The v_R_employee_trk view is used to create the following reports:
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5BJXHVWBFKHFNV
The v_R_guest_checks view provides guest check information for each
employee.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_guest_checks view are
listed below:
Tables Columns
6WRUHG3URFHGXUH
This view does not use any totals tables and therefore does not require a
stored procedure.
5HSRUWV The v_R_guest_checks view is used to create the following reports:
9LHZV
9LHZV
YB5BMREBFRGH
The v_R_job_code view provides information for each job code, such as
regular and overtime work hours.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_job_code view are listed
below:
Tables Columns
6WRUHG3URFHGXUH
sp_R_job_code_totals
5HSRUWV The v_R_job_code view is used to create the following reports:
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5BUYFBFDVKLHU
The v_R_rvc_cashier view provides financial information for each
cashier within an RVC, such as net sales totals and check activity.
7DEOHV&ROXPQV The tables and columns used to create the v_R_rvc_cashier view are
listed below:
Tables Columns
Restaurant obj_num
(rest_def)
6WRUHG3URFHGXUH sp_R_rvc_cashier
sp_R_rvc_cashier_sales_tracking
5HSRUWV The v_R_cashier view is used to create the following reports:
9LHZV
9LHZV
YB5BUYFBFDVKLHUBWUN
The v_R_rvc_cashier_trk view provides tracking total information for
each employee in an RVC.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_rvc_cashier_trk view are
listed below:
Tables Columns
store_id shift_seq
6WRUHG3URFHGXUH
sp_R_rvc_cashier_tracking
sp_R_rvc_cashier_sales_tracking
5HSRUWV The v_R_rvc_cashier_trk view is used to create the following reports:
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5BUYFBHPSOR\HH
The v_R_rvc_employee view provides sales and tip total information for
each employee.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_rvc_employee view are
listed below:
Tables Columns
Restaurant obj_num
(rest_def)
6WRUHG3URFHGXUH
sp_R_rvc_employee_sales_tracking
9LHZV
9LHZV
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5BUYFBHPSOR\HHBVDOHVBWLSV
The v_R_rvc_employee_sales_tips view provides sales and tip
information for each employee in an RVC, such as net sales and charged
tips.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_rvc_employee_sales_tips
view are listed below:
Tables Columns
Restaurant obj_num
(rest_def)
6WRUHG3URFHGXUH
sp_R_rvc_employee
9LHZV
9LHZV
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5BUYFBHPSOR\HHBWUN
The v_R_rvc_employee_trk view provides tracking total information for
each employee in an RVC.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_rvc_employee_trk view
are listed below:
Tables Columns
Restaurant obj_num
(rest_def)
6WRUHG3URFHGXUH
sp_R_rvc_employee_tracking
5HSRUWV The v_R_rvc_employee_trk view is used to create the following reports:
9LHZV
9LHZV
YB5BUYFBIDPBJUS
The v_R_rvc_fam_grp view provides a summary by revenue center of
family group sales activity.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_rvc_fam_grp view are
listed below:
Tables Columns
6WRUHG3URFHGXUH
sp_R_family_group
5HSRUWV The v_R_rvc_fam_grp view is used to create the following reports:
Note
These report templates are also used to create the RVC Major
Group Sales Detail and RVC Menu Item Group Sales Detail
reports.
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5BUYFBPDMBJUS
The v_R_rvc_maj_grp view provides a summary by revenue center of
major group sales activity.
7DEOHV&ROXPQV The tables and columns used to create the v_R_rvc_maj_grp view are
listed below:
Tables Columns
6WRUHG3URFHGXUH sp_R_major_group
5HSRUWV The v_R_rvc_maj_grp view is used to create the following reports:
Note
These report templates (*.rpt) are also used to create the RVC
Family Group Sales Detail and RVC Menu Item Group Sales
Detail reports.
9LHZV
9LHZV
YB5BUYFBPLBJUS
The v_R_rvc_mi_grp view provides a summary by revenue center of
menu item group sales activity.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_rvc_mi_grp view are
listed below:
Tables Columns
6WRUHG3URFHGXUH
sp_R_menuitem_group
5HSRUW7HPSODWHV The v_R_rvc_mi_grp view is used to create the following reports:
Note
Note that these report templates (*.rpt) are also used to create
the RVC Family Group Sales Detail and RVC Major Group
Sales Detail reports.
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5BUYFBPHQXLWHP
The v_R_rvc_menuitem view may be used to create a Revenue Center
Menu Item Report. This view is not used by any of the standard 3700
reports.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_rvc_menuitem view are
listed below:
Tables Columns
6WRUHG3URFHGXUH
sp_R_menuitem
5HSRUWV This view is not used by any of the standard 3700 reports.
9LHZV
9LHZV
YB5BUYFBPHQXLWHPBIDPBJUS
The v_R_rvc_menuitem_fam_grp view provides detailed sales
information by revenue center for each of the menu items in a family
group.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_rvc_menuitem_fam_grp
view are listed below:
Tables Columns
6WRUHG3URFHGXUH sp_R_menuitem
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
9LHZV
9LHZV
YB5BUYFBPHQXLWHPBPDMBJUS
The v_R_rvc_menuitem_maj_grp view provides detailed sales
information by revenue center for each of the menu items in a major
group.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_rvc_menuitem_maj_grp
view are listed below:
Tables Columns
6WRUHG3URFHGXUH sp_R_menuitem
5HSRUWV The v_R_rvc_menuitem_maj_grp view is used to create the following
reports:
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5BUYFBPHQXLWHPBPLBJUS
The v_R_rvc_menuitem_mi_grp view provides detailed sales information
by revenue center for each of the menu items in a menu item group.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_rvc_menuitem_mi_grp
view are listed below:
Tables Columns
6WRUHG3URFHGXUH sp_R_menuitem
5HSRUWV The v_R_rvc_menuitem_mi_grp view is used to create the following
reports:
9LHZV
9LHZV
YB5BUYFBVDOHV
The v_R_rvc_sales view provides sales and tip information for each
revenue center, such as net sales and charged tips.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_rvc_sales view are listed
below:
Tables Columns
Restaurant obj_num
(rest_def) store_id
6WRUHG3URFHGXUH
sp_R_rvc_totals, sp_R_time_card_totals
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
9LHZV
9LHZV
YB5BUYFBVDOHVBWLSV
The v_R_rvc_sales_tips view provides sales and tip information for each
revenue center, such as net sales and charged tips.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_rvc_sales_tips view are
listed below:
Tables Columns
6WRUHG3URFHGXUH
sp_R_rvc_totals
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
9LHZV
9LHZV
YB5BUYFBWD[
The v_R_rvc_tax view provides tax information for each revenue center.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_rvc_tax view are listed
below:
Tables Columns
6WRUHG3URFHGXUH
sp_R_tax
5HSRUWV The v_R_rvc_tax view is used to create the following reports:
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5BUYFBWLPHBSHULRG
The v_R_rvc_time_period view provides financial information for each
revenue center based on time periods.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_rvc_time_period view are
listed below:
Tables Columns
6WRUHG3URFHGXUH
sp_R_time_period
sp_R_time_prd_time_card_ttls
5HSRUWV The v_R_rvc_time_period view is used to create the following reports:
9LHZV
9LHZV
YB5BUYFBWLPHBSHULRGBWUN
The v_R_rvc_time_period_trk view provides financial information based
on time periods for each revenue center.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_rvc_time_period_trk view
are listed below:
Tables Columns
6WRUHG3URFHGXUH
sp_R_rvc_time_prd_sales_trk
5HSRUWV The v_R_rvc_time_period_trk view is used to create the following
reports:
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5BUYFBWUN
The v_R_rvc_trk view may be used to create a Revenue Center Tracking
Group report.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_rvc_trk view are listed
below:
Tables Columns
6WRUHG3URFHGXUH v_R_rvc_sales_tracking
5HSRUWV The v_R_rvc_trk view is used to create the following reports:
9LHZV
9LHZV
YB5BV\VBIDPBJUS
The v_R_sys_fam_grp view provides a system-wide summary of family
group sales activity.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_sys_fam_grp view are
listed below:
Tables Columns
6WRUHG3URFHGXUH
sp_R_family_group
5HSRUWV The v_R_sys_fam_grp view is used to create the following reports:
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5BV\VBPDMBJUS
The v_R_sys_maj_grp view provides a system-wide summary of major
group sales activity.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_sys_maj_grp view are
listed below:
Tables Columns
6WRUHG3URFHGXUH
sp_R_major_group
5HSRUWV The v_R_sys_maj_grp view is used to create the following reports:
9LHZV
9LHZV
YB5BV\VBPLBJUS
The v_R_sys_mi_grp view provides a system-wide summary of menu
item group sales activity.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_sys_mi_grp view are
listed below:
Tables Columns
6WRUHG3URFHGXUH
sp_R_menuitem_group
5HSRUWV The v_R_sys_mi_grp view is used to create the following reports:
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5BV\VBPHQXLWHP
The v_R_sys_menuitem view may be used to create a System Menu Item
report. This view is not used by any of the standard 3700 reports.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_sys_menuitem view are
listed below:
Tables Columns
6WRUHG3URFHGXUH sp_R_menuitem
5HSRUWV This view is not used by any of the standard 3700 reports.
9LHZV
9LHZV
YB5BV\VBPHQXLWHPBIDPBJUS
The v_R_sys_menuitem_fam_grp view provides system-wide detailed
sales information for each of the menu items in a family group.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_sys_menuitem_fam_grp
view are listed below:
Tables Columns
6WRUHG3URFHGXUH sp_R_menuitem
5HSRUWV The v_R_sys_menuitem_fam_grp view is used to create the following
reports:
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5BV\VBPHQXLWHPBPDMBJUS
The v_R_sys_menuitem_maj_grp view provides system-wide detailed
sales information for each of the menu items in a major group.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_sys_menuitem_maj_grp
view are listed below:
Tables Columns
6WRUHG3URFHGXUH sp_R_menuitem
5HSRUWV The v_R_sys_menuitem_maj_grp view is used to create the following
reports:
9LHZV
9LHZV
YB5BV\VBPHQXLWHPBPLBJUS
The v_R_sys_menuitem_mi_grp view provides system-wide detailed
sales information for each of the menu items in a menu item group.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_sys_menuitem_mi_grp
view are listed below:
Tables Columns
6WRUHG3URFHGXUH sp_R_menuitem
5HSRUWV The v_R_sys_menuitem_mi_grp view is used to create the following
reports:
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5BV\VBVDOHV
The v_R_sys_sales view provides system-wide sales and tip information,
such as net sales and charged tips.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_sys_sales view are listed
below:
Tables Columns
6WRUHG3URFHGXUH
sp_R_sys_totals
sp_R_time_card_ttls
9LHZV
9LHZV
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5BV\VBVDOHVBWLSV
The v_R_sys_sales_tips provides system-wide sales and tip information,
such as net sales and charged tips.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_sys_sales_tips view are
listed below:
Tables Columns
6WRUHG3URFHGXUH
sp_R_sys_totals
sp_R_time_card_ttls
9LHZV
9LHZV
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5BV\VBWD[
The v_R_sys_tax view provides system-wide tax information.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_sys_tax view are listed
below:
Tables Columns
6WRUHG3URFHGXUH
sp_R_tax
5HSRUWV The v_R_sys_tax view is used to create the following reports:
9LHZV
9LHZV
YB5BV\VBWLPHBSHULRG
The v_R_sys_time_period view provides system-wide financial
information based on time periods.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_sys_time_period view are
listed below:
Tables Columns
6WRUHG3URFHGXUH sp_R_time_period
sp_R_sys_time_prd_time_card_ttls
5HSRUWV The v_R_sys_time_period view is used to create the following reports:
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5BV\VBWLPHBSHULRGBWUN
The v_R_sys_time_period_trk view provides system-wide financial
information based on time periods.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_sys_time_period_trk view
are listed below:
Tables Columns
6WRUHG3URFHGXUH sp_R_sys_time_prd_sales_trk
sp_R_time_period_tracking
5HSRUWV The v_R_sys_time_period_trk view is used to create the following
reports:
9LHZV
9LHZV
YB5BV\VBWUN
The v_R_sys_trk view may be used to create a System Tracking Group
report.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_sys_trk view are listed
below:
Tables Columns
6WRUHG3URFHGXUH
sp_R_sys_sales_tracking
5HSRUWV The v_R_sys_trk view is used to create the following reports:
64/'DWDEDVH$FFHVV
9LHZV
9LHZV
YB5BWLPHBFDUGBDGM
The v_R_time_card_adj view is used by the v_R_employee_time_card
view. The v_R_time_card_adj view is not used by any of the standard
3700 reports.
7DEOHV&ROXPQV
The tables and columns used to create the v_R_time_card_adj view are
listed below:
Tables Columns
6WRUHG3URFHGXUH
This view does not require a stored procedure.
5HSRUWV This view is not used by any of the standard 3700 reports.
Chapter 7
Stored Procedures
In this chapter
What are Stored Procedures? .................................................................7-2
Using Stored Procedures ....................................................................... 7-2
3700 Stored Procedures......................................................................... 7-3
&UHDWLQJ6WRUHG3URFHGXUHV
Stored procedures are created using the CREATE PROCEDURE
statement. Note that you must have RESOURCE authority in order to
create a procedure.
Refer to the Sybase SQL Anywhere User’s Guide for the syntax of the
CREATE PROCEDURE statement.
'URSSLQJRU5HPRYLQJ6WRUHG3URFHGXUHV
Once a custom procedure is created, it remains in the database until it is
explicitly removed. It is recommended that custom stored procedures be
saved in a text file. A database conversion will not preserve any custom
objects. Note that only the owner of the procedure can drop the procedure
from the database.
&DOOLQJ6WRUHG3URFHGXUHV
A stored procedure can be invoked with a CALL statement, by an
application program, or by other procedures. Refer to the Sybase SQL
Anywhere User’s Guide for the syntax of the CALL statement.
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV8VHGWR*HQHUDWH5HSRUWV
The following stored procedures are used to update the totals that are used
in generating reports.
Note
There is no need to call several stored procedures if they update
the same tables. You need only call the one with the most table
updates.
Stored Tables
Purpose Tables Updated
Procedure Read
64/'DWDEDVH$FFHVV
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV
Stored Tables
Purpose Tables Updated
Procedure Read
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV
Stored Tables
Purpose Tables Updated
Procedure Read
64/'DWDEDVH$FFHVV
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV
Stored Tables
Purpose Tables Updated
Procedure Read
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV
Stored Tables
Purpose Tables Updated
Procedure Read
6WRUHG3URFHGXUHVDYDLODEOHWKURXJK$XWRVHTXHQFHV
The following stored procedures can be called through an autosequence.
7DEOHV8SGDWHG
q time_card_dtl
q emp_status
5HODWHG5HSRUWV
There are no related reports.
7DEOHV8SGDWHG
q time_card_dtl
64/'DWDEDVH$FFHVV
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV
q emp_status
5HODWHG5HSRUWV
There are no related reports
7DEOHV8SGDWHG
q time_card_dtl
q emp_status
5HODWHG5HSRUWV
There are no related reports.
7DEOHV8SGDWHG
q rest_status
q cc_batch_item_dtl
q chk_dtl
5HODWHG5HSRUWV
There are no related reports.
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV
Employee Clocked In
sp_EmployeeClockedIn
This stored procedure is usually run as part of the end of night
autosequence. The procedure checks to see if any employees are clocked
in. If employees are clocked in, the stored procedure branches to print a
status report and can be programmed to clock out all clocked in
employees using the Clock Out an Employee stored procedure.
7DEOHV5HDG
q emp_status
7DEOHV8SGDWHG
This stored procedure does not update any tables.
5HODWHG5HSRUWV
There are no related reports.
7DEOHV8SGDWHG
This stored procedure does not update any tables
5HODWHG5HSRUWV
There are no related reports.
7DEOHV8SGDWHG
q shift_cshr_dtl
q shift_cshr_ttl
64/'DWDEDVH$FFHVV
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV
q cshr_ttl_status
5HODWHG5HSRUWV
There are no related reports
7DEOHV8SGDWHG
q shift_emp_dtl
q shift_emp_ttl
q emp_status
q rvc_sign_in_status
5HODWHG5HSRUWV
There are no related reports.
5HODWHG5HSRUWV
q Cashier Summary Totals
(CSHR_001.RPT)
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV
This stored procedure calls the sp_post stored procedure with parameters
that specify for it to call sp_post_cshr_cum, sp_post_cshr_ot_cum, and
sp_post_cshr_trk_cum.
7DEOHV8SGDWHG
q shift_cshr_ttl
q shift_cshr_ot_ttl
q shift_cshr_trk_ttl
5HODWHG5HSRUWV
q Cashier Detail Totals (CSHR_101.RPT)
5HODWHG5HSRUWV
q Cashier Detail Totals by RVC (CSHR_701)
q Consolidated Cashier Detail Totals (CSHR_702)
5HODWHG5HSRUWV
q Cashier Summary Totals by RVC (CSHR_601.RPT)
64/'DWDEDVH$FFHVV
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV
7DEOHV8SGDWHG
q dly_emp_job_code_ttl
q dly_job_code_ttl
5HODWHG5HSRUWV
q Employee Job Summary (Time_003.RPT)
q Consolidated Employee Job Summary (Time_004.RPT)
5HODWHG5HSRUWV
q Employee Detail Totals (EMP_101.RPT)
q Consolidated Employee Detail Totals (EMP_102.RPT)
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV
q shift_rvc_emp_trk_ttl
5HODWHG5HSRUWV
q Employee Detail Totals by Revenue Center (EMP_701.RPT)
q Consolidated Employee Detail Totals by Revenue Center
(EMP_702.RPT)
5HODWHG5HSRUWV
q Employee Tip Totals by Revenue Center (EMP_805.RPT)
q Consolidated Employee Tip Totals by Revenue Center
(EMP_806.RPT)
5HODWHG5HSRUWV
q Daily RVC Group Sales Detail Subtotal by Category (FG_R010.RPT)
q Consolidated RVC Group Sales Detail Subtotal by Category
(FG_R012.RPT)
q Daily SYS Group Sales Detail Subtotal by Category (FG_S010.RPT)
q Consolidated System Group Sales Detail Subtotal by Category
(FG_S012.RPT)
64/'DWDEDVH$FFHVV
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV
5HODWHG5HSRUWV
q Revenue Center Job Summary (Time_R011.RPT)
q Consolidated Revenue Center Job Summary (Time_R012.RPT)
q System Job Summary (Time_S011.RPT)
q Consolidated System Job Summary (Time_S012.RPT)
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV
5HODWHG5HSRUWV
This stored procedure uses the family group reports.
5HODWHG5HSRUWV
This stored procedure uses the family group reports.
5HODWHG5HSRUWV
q Daily Revenue Center Menu Item Sales Detail (MI_R001.RPT)
q Consolidated Revenue Center Menu Item Sales Detail
(MI_R002.RPT)
q Daily Revenue Center Menu Item Sales Summary (MI_R101.RPT)
q Consolidated Revenue Center Menu Item Sales Summary
(MI_R102.RPT)
q Daily System Menu Item Sales Detail (MI_S001.RPT)
q Consolidated System Menu Item Sales Detail (MI_S002.RPT)
q Daily System Menu Item Sales Summary (MI_S101.RPT)
64/'DWDEDVH$FFHVV
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV
5HODWHG5HSRUWV
q Daily Revenue Center Sales Detail (RVC_101.RPT)
q Consolidated Revenue Center Sales Detail (RVC_102.RPT)
5HODWHG5HSRUWV
q Revenue Center Time Period Detail (TP_R101.RPT)
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV
This stored procedure calls the sp_post stored procedure with parameters
that specify for it to call sp_post_cum.
7DEOHV8SGDWHG
q dly_rvc_ttl
q dly_rvc_ot_ttl
q dly_sys_ttl
q dly_sys_ot_ttl
5HODWHG5HSRUWV
q Consolidated Revenue Center Tip Totals (Tip_R001.RPT)
64/'DWDEDVH$FFHVV
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV
5HODWHG5HSRUWV
q Revenue Center Time Period Detail (TP_R101.RPT)
5HODWHG5HSRUWV
q Consolidated System Tip Totals (Tip_S001.RPT)
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV
q job_def
7DEOHV8SGDWHG
q dly_rvc_ttl
5HODWHG5HSRUWV
q Employee Time Card and Job Detail (Time_002.RPT)
q Daily System Sales Detail (SYS_101.RPT)
q Consolidated System Sales Detail (SYS_102.RPT)
q Daily Revenue Center Sales Detail (RVC_101.RPT)
q Consolidated Revenue Center Sales Detail (RVC_102.RPT)
64/'DWDEDVH$FFHVV
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV
5HODWHG5HSRUWV
q System Time Period Totals (TP_S001.RPT)
q Consolidated System Time Period Detail (TP_S002.RPT)
q System Time Period Summary (TP_S103.RPT)
q Consolidated System Time Period Summary (TP_S104.RPT)
q Revenue Center Time Period Summary (TP_R103.RPT)
q Revenue Center Time Period Totals (TP_R001.RPT)
7DEOHV8SGDWHG
There are no tables updated with this stored procedure.
5HODWHG5HSRUWV
There are no related reports.
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV
7DEOHV5HDG
This stored procedure does not read any tables.
7DEOHV8SGDWHG
q emp_def
5HODWHG5HSRUWV
There are no related reports.
5HODWHG5HSRUWV
There are no related reports.
5HODWHG5HSRUWV
There are no related reports.
64/'DWDEDVH$FFHVV
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV
7DEOHV8SGDWHG
q uws_def
5HODWHG5HSRUWV
There are no related reports.
7DEOHV8SGDWHG
This stored procedure does not update any tables.
5HODWHG5HSRUWV
There are no related reports.
7DEOHV8SGDWHG
q rest_status
q dly_sys_ttl
5HODWHG5HSRUWV
There are no related reports.
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV
7DEOHV5HDG
q chk_dtl
7DEOHV8SGDWHG
This stored procedure does not update any tables.
5HODWHG5HSRUWV
There are no related reports.
64/'DWDEDVH$FFHVV
6WRUHG3URFHGXUHV
6WRUHG3URFHGXUHV
Chapter 8
Domain Datatypes
In this chapter
Datatype Overview.................................................................................8-2
SQL Anywhere Datatypes..................................................................... 8-3
3700 Domain Datatypes ........................................................................ 8-4
Database Domain Report .................................................................... 8-40
The Domain Report Template ............................................................. 8-46
64/'DWDEDVH$FFHVV
'RPDLQ'DWDW\SHV
'DWDW\SH2YHUYLHZ
Datatype Overview
A datatype is a specification that designates the type of information
accepted in a column and the manner in which data is stored. Each
column in the 3700 Database is assigned a specific datatype.
The datatype definition for each column depends on the SQL DBMS
being used. For instance, the 3700 domain Breakpoint uses the
SMALLINT datatype in a SQL Anywhere Database.
'RPDLQ'DWDW\SHV
64/$Q\ZKHUH'DWDW\SHV
Datatype Description
datetime A timestamp containing both the calendar date and time of day
for a point in time. The useful range of values is 1600-02-28
23:59:59 to 7911-01-01 00:00:00. The storage size is 8 bytes.
numeric (precision, scale) Decimal number where precision is the total number of digits
and scale is the number of digits after the decimal point.
64/'DWDEDVH$FFHVV
'RPDLQ'DWDW\SHV
'RPDLQ'DWDW\SHV
64/'DWDEDVH$FFHVV
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
'DWDEDVH7DEOHV
ADDRESS_COUNTRY char(25) Null
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
'DWDEDVH7DEOHV
E-RESPONSE_ERROR
M-CA_RESPONSE_MANUAL_AUTH_REQUESTED
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
COUNT_TYPE numeric(1) Null 1-On-Hand Count of Selected Locations for Order Placement
2-Key Item Count of Selected Locations
3-Complete Count of All Locations
'DWDEDVH7DEOHV
COURSE_NUM numeric(2) Null 1-16
Null
'DWDEDVH7DEOHV
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
'DWDEDVH7DEOHV
T-Sent
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
'DWDEDVH7DEOHV
'DWDEDVH7DEOHV
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
ID_FIELD char(16)
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
'DWDEDVH7DEOHV
Null
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
'DWDEDVH7DEOHV
NAME16 char(16) Null
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
'DWDEDVH7DEOHV
'DWDEDVH7DEOHV
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
'DWDEDVH7DEOHV
'DWDEDVH7DEOHV
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
'DWDEDVH7DEOHV
PO_PREFIX char(6) Null
'DWDEDVH7DEOHV
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
'DWDEDVH7DEOHV
'DWDEDVH7DEOHV
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
'DWDEDVH7DEOHV
110-POS2800_SU_ASEQ_RPT_EMPLOYEE_LABOR _DTL
111-POS2800_SU_ASEQ_RPT_EMPLOYEE_LABOR_
SUMMARY
121-POS2800_SU_ASEQ_RPT_LABOR_AVAILABILITY
122-POS2800_SU_ASEQ_RPT_JOB_CODE_LABOR
'DWDEDVH7DEOHV
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
'DWDEDVH7DEOHV
'DWDEDVH7DEOHV
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
'DWDEDVH7DEOHV
PRIORITY numeric(4) Null 0-9999
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
'DWDEDVH7DEOHV
Null 1-Round Up
2-Round Down
3-Round Nearest
Null
'DWDEDVH7DEOHV
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
'DWDEDVH7DEOHV
SVC_ITMZR_NUM numeric(1) Not 1 1-4
Null
I-TAX_TYPE_INCLUSIVE
'DWDEDVH7DEOHV
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
'DWDEDVH7DEOHV
C-TS_ICON_PLACEMENT_CENTER
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
SQL
Default
3700 Domain Datatype Anywhere Null? Allowed Values
Value
Datatype
'DWDEDVH7DEOHV
'RPDLQ'DWDW\SHV
'DWDEDVH'RPDLQ5HSRUW
$GGLQJD5HSRUW&ODVV
Report classes allow you to assign similar attributes to a group of reports.
The 3700 database is installed with a set of pre-defined report classes
applicable to most POS operations. For some reports, however, the
available options may not be applicable and a new report class may be
required.
Follow these steps to add a new Report Class:
1. Open the POS Configurator.
2. Select Reporting | Report Classes.
'RPDLQ'DWDW\SHV
'DWDEDVH'RPDLQ5HSRUW
Note
MICROS assigns pre-defined report classes a number of 9999
or below. By setting the new report class at 10000 or greater,
you ensure that upgrades or reinstallation of the POS system
will not overwrite your custom entries.
$VVLJQLQJD5HSRUW7HPSODWH
Report templates are pre-defined files that filter the data and determine
how it will be displayed or printed when a report is generated. The 3700
System ships with a number of standard reports and templates, which can
be accessed and configured to meet specific customer needs. To do this,
the report template is linked to a report class, a new report name is added,
and the template is assigned.
Follow these steps to add a new report and assign the appropriate
template:
1. Open the POS Configurator.
64/'DWDEDVH$FFHVV
'RPDLQ'DWDW\SHV
'DWDEDVH'RPDLQ5HSRUW
Note
MICROS assigns pre-defined reports a number of 9999 or
below. By assigning the report record number a value of 10000
or greater, you ensure that upgrades or reinstallation of the POS
system will not overwrite your entries.
4. Enter a Name for the report. Be precise! This is the name that will be
displayed on the Reports folder in the Autosequences and Reports
module. It is also used as a default header for the generated report.
5. Select a Report Class from the drop-down list. For this report,
choose the report class that was added in the preceding section.
6. Make sure that the 40-column report, Hide on run screen, and
Use List checkboxes are blank. Clear the boxes, if necessary.
'RPDLQ'DWDW\SHV
'DWDEDVH'RPDLQ5HSRUW
Note
Report templates are normally stored in the Micros/res/pos/
reports directory. If you store this template elsewhere, you
must modify the path accordingly. Failure to properly specify
the template location may result in an error message when the
report is run.
5XQQLQJWKH5HSRUW
Reports are run from the Autosequences and Reports module. Once
defined, they can be run manually or as part of an automated sequence.
Follow these steps to run the Database Domain Report:
1. Open the Autosequences and Reports module.
2. Select the Reports tab.
64/'DWDEDVH$FFHVV
'RPDLQ'DWDW\SHV
'DWDEDVH'RPDLQ5HSRUW
4. Select the report name from the list and click Next.
Note
For illustration, the report was named Database Domain
Report in Step 4 of the preceding section. If you enter a
different name, that name will appear in this list.
'RPDLQ'DWDW\SHV
'DWDEDVH'RPDLQ5HSRUW
5. Since the report template neither requires nor accepts range values,
the following screen may be ignored.
Note
The report will take a few minutes to generate. There are
approximately 1200 rows that must be read into the
Autosequences and Reports module before the report is
displayed.
64/'DWDEDVH$FFHVV
'RPDLQ'DWDW\SHV
7KH'RPDLQ5HSRUW7HPSODWH
Chapter 9
Database Tables
This chapter contains a list of the 3700 database tables. The table name,
column names, datatype, primary key, foreign key, alternate key, and null
options are provided for each table.
In this chapter
Types of Database Tables .......................................................................9-2
Overview ............................................................................................... 9-3
Database Schema Report....................................................................... 9-4
Using the Report Executable............................................................... 9-10
The Schema Report ............................................................................. 9-14
64/'DWDEDVH$FFHVV
'DWDEDVH7DEOHV
7\SHVRI'DWDEDVH7DEOHV
'DWDEDVH7DEOHV
2YHUYLHZ
Overview
This chapter provides the following information for each 3700 database
table.
q Logical Table Name
The logical name for the database table. This name appears at the top
of the page.
q Physical Table Name
The physical name for the database table. This name appears just
below the logical table name. Note that the Physical Table Name is
recognized by the database.
q Logical Column Name
The logical column name for each column contained in the database
table. This name appears in the first column of the tables in this
chapter.
q Physical Column Name
The physical name for each column contained in the database table.
This name appears in the second column of the tables in this chapter.
Note that the Physical Column Name is recognized by the database.
q Column Datatype
The datatype for the physical table column names. This name appears
in the third column of the tables in this chapter.
q Primary Key (PK)
PK is designated for every database table column that is a primary
key. PK appears in the fourth column of the tables in this chapter.
q Foreign Key (FK)
FK is designated for every database table column that is a foreign key.
FK appears in the fifth column of the tables in this chapter.
q Alternate Key
AK is designated for every database table column that is an alternate
key and can be uniquely indexed. IE (index entry) is designated for
every column that has a non-unique index. AK or IE followed by a
number appears in the sixth column of the tables in this chapter.
q Null Option
NULL or NOT NULL is designated for every database table column.
This option appears in the seventh column of the tables in this
chapter.
64/'DWDEDVH$FFHVV
'DWDEDVH7DEOHV
'DWDEDVH6FKHPD5HSRUW
Note
The report executable will not operate unless you have
Crystal Reports v6.0 Professional software installed.
$GGLQJD5HSRUW&ODVV
Report classes allow you to assign similar attributes to a group of reports.
The 3700 database is installed with a set of pre-defined report classes
applicable to most POS operations. For some reports, however, the
available options may not be relevant and a new report class may be
required.
Follow these steps to add a new Report Class:
1. Open the POS Configurator.
'DWDEDVH7DEOHV
'DWDEDVH6FKHPD5HSRUW
Note
MICROS assigns pre-defined report classes a number of 9999
or below. By setting the new report class at 10000 or greater,
you ensure that upgrades or reinstallation of the POS system
will not overwrite your entries.
$VVLJQLQJD5HSRUW7HPSODWH
Report templates are pre-defined files that filter the data and determine
how it will be displayed or printed when a report is generated. The 3700
System ships with a number of standard reports and templates, which can
be accessed and configured to meet specific customer needs. To do this,
the report template is linked to a report class, a new report name is added,
and the template is assigned.
64/'DWDEDVH$FFHVV
'DWDEDVH7DEOHV
'DWDEDVH6FKHPD5HSRUW
Follow these steps to create a new report and assign the appropriate
template:
1. Open the POS Configurator.
2. Select Reporting | Report Templates.
Note
MICROS assigns pre-defined reports a number of 9999 or
below. By assigning the report record number a value of 10000
or greater, you ensure that upgrades or reinstallation of the POS
system will not overwrite your custom entries.
4. Enter a Name for the report. Be precise! This is the name that will be
displayed on the Reports folder in the Autosequences and Reports
module. It is also used as a default header for the generated report.
5. Select a Report Class from the drop-down list. For this report,
choose the report class that was added in the preceding section.
6. Make sure that the 40-column report, Hide on run screen, and
Use List checkboxes are blank. Clear the boxes, if necessary.
'DWDEDVH7DEOHV
'DWDEDVH6FKHPD5HSRUW
Note
Report templates are normally stored in the
MICROS\Res\Pos\Reports directory. If you store this template
elsewhere, you must modify the path accordingly. Failure to
properly specify the template location may result in an error
message when the report is run.
5XQQLQJWKH5HSRUW
Reports are run from the Autosequences and Reports module. Once
defined, they can be run manually or as part of an automated sequence.
Follow these steps to run the Database Schema Report:
1. Open the Autosequences and Reports module.
2. Select the Reports tab.
64/'DWDEDVH$FFHVV
'DWDEDVH7DEOHV
'DWDEDVH6FKHPD5HSRUW
4. Select the report name from the list and click Next.
Note
For illustration, the report was named Database Schema
Report in Step 4 of the preceding section. If you enter a
different name, that name will appear in this list.
'DWDEDVH7DEOHV
'DWDEDVH6FKHPD5HSRUW
5. Since the report template neither requires nor accepts range values,
the following screen may be ignored.
Note
The report will take a few minutes to generate. There are
approximately 8400 rows that must be read into the
Autosequences and Reports module before the report is
displayed.
64/'DWDEDVH$FFHVV
'DWDEDVH7DEOHV
8VLQJWKH5HSRUW([HFXWDEOH
Note
To run the Schema Report executable, you must have Crystal
Reports v6.0 Professional software already installed.
Follow these steps to run the report from the MICROS Application
shortcut:
1. From the Windows Start menu, click on Programs | MICROS
Applications | Reports | Database schema report.
2. Select a Report display from the drop-down list. The options are:
q Print the report to a window—previews the report on the screen
q Export the report—saves the results to a file
q Print the report to a printer—sends the report to a designated
printer
3. Select a run-time from the drop-down list. The options are:
q right now
q in one hour
q at 10:00 tonight
q at midnight
q at 2:00 tomorrow morning
'DWDEDVH7DEOHV
8VLQJWKH5HSRUW([HFXWDEOH
64/'DWDEDVH$FFHVV
'DWDEDVH7DEOHV
8VLQJWKH5HSRUW([HFXWDEOH
Icon Description
'DWDEDVH7DEOHV
8VLQJWKH5HSRUW([HFXWDEOH
Icon Description
6. Ignore the Use Saved Data and Refresh Data radio buttons as
well as the Modify Selection Formula checkbox. (These options
are a part of the underlying Sybase utility which is not accessible
through this application.)
7. Click Print to run the report.
8. Click Done to exit the Database Schema report program.
64/'DWDEDVH$FFHVV
'DWDEDVH7DEOHV
7KH6FKHPD5HSRUW
Index
A I
alternate key ISQL (Interactive Structured Query Language)
defined 1-3 using 3-2–3-3
B K
Borland Database Engine (BDE) 1-5, 1-6, 2-2 keys
button defined 1-2–1-3
terminology illustrated 5-3
M
C
Microsoft Excel
client/server with 3700 data 4-5–4-6
benefits of 1-4 Microsoft Query 4-5
defined 1-4
Crystal Reports O
using 4-2–4-4
Open Database Connectivity (ODBC) 1-5, 1-6
D configuring manually 2-3–2-4
described 2-2
database
3700 system overview 1-5–1-6 P
defined 1-2–1-3
viewing data 3-3 primary key
viewing the structure 3-4–3-5 defined 1-2
database table
updated by system configurator 5-4–5-13 Q
definition tables 1-6
detail tables 1-6 Query. See Microsoft Query
Devices folder
database tables updated by 5-7–5-8 R
E relational database
defined 1-2
Employees folder Reporting folder
database tables updated by 5-6–5-7 database tables updated by 5-12–5-13
Excel. See Microsoft Excel reports
creating 4-2–4-4
F Revenue Center folder
database tables updated by 5-9–5-10
folder
terminology illustrated 5-3 S
foreign key
defined 1-3 Sales folder
form database tables updated by 5-4–5-6
terminology illustrated 5-3 SQL
commands, issuing 3-3
defined 1-4
)HDWXUH5HIHUHQFH ,QGH[
SQL Anywhere
described 1-5
needed before configuring ODBC 2-3
SQL Anywhere ISQL utility
displaying data 3-3
starting 3-2
SQL Central
using 3-4–3-5
status tables 1-6
,QGH[
stored procedures sp_ResetRVC_UWSCashierLink 7-21
defined 7-2 sp_RVCOpenChecks 7-22
sp_ClockOutAllEmployees 7-7 sp_SetBusinessDate 7-22
sp_ClockOutEmployee 7-7 sp_SystemOpenChecks 7-22
sp_ClockOutInEmployee 7-8 using 7-2
sp_CreateCCBatch 7-8 Structured Query Language. See SQL
sp_EmployeeClockedIn 7-9 system configurator
sp_EmployeeOpenChecks 7-9 database tables updated by 5-4–5-13
sp_IncrementCshrShift 7-9 System folder
sp_IncrementEmpShift 7-10 database tables updated by 5-10–5-11
sp_PurgeHistory 7-20
sp_R_cashier 7-3, 7-10 T
sp_R_cashier_sales_tracking 7-3, 7-10
sp_R_cashier_tracking 7-3 tables, database
sp_R_cons_rvc_cashier_ttls 7-3 types of 1-6
sp_R_cons_rvc_emp_ttls 7-3 updated by system configurator 5-4–5-13
sp_R_cons_sys_time_prd_ttls 7-4 TCP/IP
sp_R_cons_sys_ttls 7-4 defined 1-5
sp_R_consolidated_cshr_ttls 7-3 totals tables 1-6
sp_R_consolidated_emp_ttls 7-3
sp_R_consolidated_rvc_time_prd_ttls 7-4 V
sp_R_consolidated_rvc_ttls 7-4
sp_R_employee 7-4 view
sp_R_employee_job_code 7-4, 7-12 adding 6-3
sp_R_employee_sales_tracking 7-4, 7-12 defined 6-2
sp_R_employee_tracking 7-4 used by report template 6-4
sp_R_enc_employee_sales_tracking 7-12
sp_R_family_group 7-4
sp_R_job_code_totals 7-4, 7-14
sp_R_major_group 7-4, 7-14
sp_R_menuitem 7-5, 7-15
sp_R_menuitem_group 7-5, 7-15
sp_R_rvc_cashier 7-5
sp_R_rvc_cashier_sales_tracking 7-5
sp_R_rvc_cashier_tracking 7-11
sp_R_rvc_employee 7-5, 7-11, 7-13
sp_R_rvc_employee_sales_trk 7-5
sp_R_rvc_employee_tracking 7-5
sp_R_rvc_sales_tracking 7-5, 7-16, 7-17
sp_R_rvc_time_period_sales_tracking 7-6
sp_R_rvc_time_period_tracking 7-6
sp_R_rvc_totals 7-6, 7-16
sp_R_rvc_tracking 7-6
sp_R_sys_sales_tracking 7-6
sp_R_sys_time_period_sales_tracking 7-6
sp_R_sys_time_period_tracking 7-6
sp_R_sys_totals 7-6, 7-18
sp_R_sys_tracking 7-6
sp_R_tax 7-6, 7-18
sp_R_time_card_detail 7-6
sp_R_time_card_ttls 7-7, 7-18
sp_R_time_period 7-7, 7-20
sp_R_time_prd_sales_trk 7-16, 7-17
sp_R_time_prd_time_card_ttls 7-7
sp_ResetCashDrawerLink 7-20
sp_ResetCashierLink 7-21
sp_ResetOneTouchSignIn 7-21
)HDWXUH5HIHUHQFH ,QGH[
views
v_R_cashier 6-6
v_R_cashier_trk 6-7
v_R_CCBatch 6-8
v_R_CCBatch_Xfer_Status 6-10
v_R_employee 6-11
v_R_employee_job_code 6-13
v_R_employee_sales_tips 6-14
v_R_employee_time_card 6-16
v_R_employee_time_card_status 6-18
v_R_employee_trk 6-19
v_R_guest_checks 6-20
v_R_job_code 6-21
v_R_rvc_cashier 6-22
v_R_rvc_cashier_trk 6-23
v_R_rvc_employee 6-24
v_R_rvc_employee_sales_tips 6-26
v_R_rvc_employee_trk 6-28
v_R_rvc_fam_grp 6-29
v_R_rvc_maj_grp 6-30
v_R_rvc_menuitem 6-32
v_R_rvc_menuitem_fam_grp 6-33
v_R_rvc_menuitem_maj_grp 6-35
v_R_rvc_menuitem_mi_grp 6-36
v_R_rvc_mi_grp 6-31
v_R_rvc_sales 6-37
v_R_rvc_sales_tips 6-39
v_R_rvc_tax 6-41
v_R_rvc_time_period 6-42
v_R_rvc_time_period_trk 6-43
v_R_rvc_trk 6-44
v_R_sys_fam_grp 6-45
v_R_sys_maj_grp 6-46
v_R_sys_menuitem 6-48
v_R_sys_menuitem_fam_grp 6-49
v_R_sys_menuitem_maj_grp 6-50
v_R_sys_menuitem_mi_grp 6-51
v_R_sys_mi_grp 6-47
v_R_sys_sales 6-52
v_R_sys_sales_tips 6-54
v_R_sys_tax 6-56
v_R_sys_time_period 6-57
v_R_sys_time_period_trk 6-58
v_R_sys_trk 6-59
v_R_time_card_adj 6-60
X
XLODBC 4-5
,QGH[