Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and...

61
Activant Prophet 21 Understanding Prophet 21 Databases

Transcript of Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and...

Page 1: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Activant Prophet 21

Understanding Prophet 21 Databases

Page 2: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

This class is designed for…

Prophet 21 users that are responsible for report writing

System AdministratorsOperations Managers

Helpful to be familiar with SQL Query Analyzer and how to write basic SQL statements

Page 3: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Objectives

Explain the difference between databases, tables and columnsExtract data from different areas of the systemDiscuss basic SQL statements using Query AnalyzerUse Prophet 21 to gather SQL InformationUtilize Data Dictionary

Page 4: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

This course will NOT cover…

Basic Prophet 21 functionalitySeagate’s Crystal Reports

Page 5: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Definitions

Columns (fields)

Contains a single piece of information

Record (rows) One complete set of columns

Table A collection of rowsView Virtual table created for easier data

extractionDatabase Collection of information organized for

easy selection of dataSQL Query Analyzer

A graphical user interface used to extract data

Page 6: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

SQL Query Analyzer

Accessed through Microsoft SQL Server

Page 7: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

SQL Server Tools

Enterprise ManagerPerform administrative functions such as backing up and restoring databases and maintaining SQL Logins

ProfilerRun traces of activity in your system

Page 8: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Basic SQL Commands

sp_helpsp_help <table_name>select * from <table_name>Select <field_name> from <table_name>

Page 9: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Most Common Reporting Areas

Address and Contact tablesOrder ProcessingInventoryPurchasingAccounts ReceivableAccounts PayableProduction Orders

Page 10: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Address and Contact tables

Used in conjunction with other tablesThese tables hold every address/contact in the system

CustomersVendorsSuppliersShip to locationsCompany locations

Page 11: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Tables and Views

TablesStores all dataOne set of information

Page 12: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Tables and Views

TablesStores all dataOne set of information

P21 ViewsBasic and Master ViewsSingle or multiple tables linked together

Page 13: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Understanding Basic and Master Views

Basic ViewsStart with nine characters:P21_VIEW_Ex: P21_VIEW_oe_hdrEvery table has a basic view

Master ViewsEnd with _VIEWEx: P21_order_VIEW

Page 14: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

p21_view_ oe_hdr

Contains most of the information seen in the order header

Page 15: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

p21_view_oe_line

Holds most of the line item information in the lower portion of an Order Processing window

Page 16: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

p21_view_oe_hdr_salesrep

Contains sales rep information per order

Page 17: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

p21_view_oe_line_schedule

Contains release information for an item

Page 18: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Order Processing

Basic ViewsP21_View_oe_hdrP21_View_oe_lineP21_View_oe_hdr_salesrepP21_View_oe_line_schedule

Master ViewsP21_ORDER_VIEW

Page 19: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

p21_view_inv_mast

Contains most of the information found in the Item Maintenance window

Page 20: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

p21_view_inv_loc

Contains most of the location-specific information on the location tab of an item

Page 21: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

p21_view_inventory_supplier

Contains most of what is found on the supplier list and supplier detail tabs in Item Maintenance

Page 22: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Inventory

Basic Viewp21_view_inv_mastp21_view_inv_locp21_view_inventory_supplier

Master ViewsP21_ITEM_VIEWP21_ITEM_LOCATION_VIEWP21_INVENTORY_USAGE_VIEW

Page 23: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

p21_view_po_hdr

Contains most of the information found in the PO header section of Purchase Orders

Page 24: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

p21_view_po_line

Contains most of the information found in the line section of a PO

Page 25: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Purchasing

Basic Viewsp21_view_po_hdrp21_view_po_line

P21 ViewsP21_PO_VIEW

Page 26: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

p21_view_assembly_hdr

Contains the information on the top half of the assembly maintenance screen

Page 27: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

p21_view_assembly_line

Contains the information on the bottom half of the assembly maintenance window

Page 28: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

p21_view_prod_order_hdr

Contains information on the top half of the production order entry window

Page 29: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

p21_view_prod_order_line

Contains information from the bottom half of the production order entry window

Page 30: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

p21_view_prod_order_line_component

Contains the component information for each assembly detail record

Page 31: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

p21_view_prod_order_line_link

Contains information from the Production order tab in order entry

Page 32: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Production Order

Basic Viewsp21_view_assembly_hdrp21_view_assembly_line p21_view_prod_order_hdr p21_view_prod_order_line p21_view_prod_order_line_component p21_view_prod_order_line_link

Master Viewp21_assembly_view

Page 33: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

p21_view_invoice_hdr

Contains most of the information found in the header section of the A/R Drill Down by Invoice Number

Page 34: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

p21_view_invoice_line

Contains most of the information found in the line section of the A/R Drill Down by Invoice window

Page 35: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

p21_view_ar_receipts_detail

Contains payment informationCommonly used fields- receipt_number - customer_id- invoice_no - payment_date- payment_amount - terms_amount

Page 36: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Accounts Receivable

Basic Viewsp21_view_invoice_hdrp21_view_invoice_linep21_view_ar_receipts_detail

Master ViewsP21_AR_VIEWP21_SALES_HISTORY_VIEWP21_AR_RECEIPTS_VIEW

Page 37: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

p21_view_apinv_hdr

Contains most of the information found in the header section of an AP voucher

Page 38: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

p21_view_apinv_line

Contains most of the information found in the line section of an AP voucher

Page 39: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Accounts Payable

Basic Viewsp21_view_apinv_hdrp21_view_apinv_line

Master ViewP21_AP_VIEW

Page 40: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Linking

Necessary when working with more than one table/viewRelationships are importantTables linked together by an ID/key fieldProvides more descriptive information

Page 41: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Linking

In this exampleoe_hdr does NOT hold line item detailoe_line does NOT hold the Item_ID

Page 42: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Linking

oe_hdr links to oe_line by order_no

Page 43: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Linking

oe_line links to inv_mast by inv_mast_uid

Page 44: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Joins

How tables/views are linked is referred to as a JOINDefault = Inner Join

Page 45: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Joins

Table/View 1

Page 46: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Joins

InnerJoin

OverlapLeft Right

Table/View 1 Table/View 2

Page 47: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Left Outer Join

Left Right

Table/View 1 Table/View 2

Left Outer Join• All data from this table

• Matches from joined table

Page 48: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Left Outer Join Example

p21_sales_history_view inv_xref

Delete flagSales History

Page 49: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Tips and Tricks

Fields common among tablesComplete flagDelete flagCancel flagRMA flag in order tablesQuote flag in order tables

Page 50: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Tips and Tricks

Fields common among tablesComplete flagDelete flagCancel flagRMA flag in order tablesQuote flag in order tables

Enumerated Values

Page 51: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Enumerated Values

Page 52: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

inv_mast_uidEnumerated Values

Page 53: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

SQL Information

RMB on fieldChoose HelpSQL Information

Page 54: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

SQL Information

Page 55: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Data Dictionary

Page 56: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Data Dictionary Searches

TableView columns and column definitions

ColumnView tables that contain a particular column

Look into information ‘behind the views’

Page 57: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Summary

Explain the difference between databases, tables and columnsExtract data from different areas of the systemRun basic SQL statements using SQL Query AnalyzerUse Prophet 21 to gather SQL InformationUtilize Data Dictionary

Page 58: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Published Solutions

Published Solution 6294 – How to back up and restore a SQL server databasePublished Solution 4242 – How to create/add a login/user for SQL server and Prophet21Published Solution 3637 – How to run a query for support using SQL 2000 Query AnalyzerPublished Solution 26762 – How to run a trace using Server 2005 profiler

Page 59: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Published Solutions

Published Solution 3638 – How to run a trace using Microsoft SQL 2000

Page 60: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

For More Information…

Prophet 21 Help FilesVisit Activant on the web: www.activant.com

View Educational Services course offeringsBrowse DocumentationSearch the Solutions databaseSubmit a web case

Email Professional Services [email protected]

Page 61: Activant Prophet 21 - Epicor · Objectives Explain the difference between databases, tables and columns Extract data from different areas of the system Discuss basic SQL statements

Crystal Reports WBT suite

Getting Started with Crystal Reports

More Crystal Reports

Optimizing Crystal Reports