44
Banner SQL 101 Georgia Summit 2013 Thursday, September 19th 3:10pm - 4:00pm Estes B Zachary Hayes Associate Registrar Georgia Institute of Technology Monday, September 23, 13

Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner SQL 101

Georgia Summit 2013

Thursday, September 19th3:10pm - 4:00pm

Estes B

Zachary HayesAssociate Registrar

Georgia Institute of Technology

Monday, September 23, 13

Page 2: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Introduction• Who is this guy?

• 10 years within USG

• Self-taught SQL and Banner

• Where does he work?

• Banner 8.5 / Oracle 11g

• Enterprise Information Systems

• Technical Analysts, Developers, DBAs

• Office of the Registrar

• Business/Information Analysts,Assistant Registrar for Technology

2

Monday, September 23, 13

Page 3: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Disclaimer

• I am not an expert

• There may be better ways to do this

• Your user access may not permit table queries

• Your IT staff may not want to help you

• For ages 5+ side effects may include headaches and nausea

3

Monday, September 23, 13

Page 4: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Agenda

• SQL Basics

• Data Dictionary

• Banner Population Selection SQL

• Banner Oracle SQL

• Questions

4

Monday, September 23, 13

Page 5: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

SQL Basics

• What is SQL?

• Structured Query Language (programming language)

• Used to manage and query data within relational databases

• Database > Schema > Table > Column > Value

• BPROD > SATURN > SPRIDEN > SPRIDEN_ID > 900012540

5

Monday, September 23, 13

Page 6: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

SQL Basics• SELECT

• What columns do you want to select?

• Banner ID, first name, confidential indicator, major

• FROM

• What tables do you need to work from?

• SPAIDEN, SPAPERS, SGASTDN

• WHERE

• How do you narrow down the data you really want?

• only Zach’s, not confidential, in ME

6

Monday, September 23, 13

Page 7: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

SQL Basics

• SELECT

• Item

• FROM

• Fruit Basket

• WHERE

• Item is an Orange

• Item is Out of Basket

7

Monday, September 23, 13

Page 8: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

SQL Basics

• SELECT

• Item

• FROM

• Fruit Basket

• WHERE

• Item is an Orange

• Item is Out of Basket

7

Monday, September 23, 13

Page 9: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

SQL Basics

• Joins

• If you are querying more than one table, you have to join them

• Aliases

• Easy to give a nickname to a table when you are using more than one

8

Monday, September 23, 13

Page 10: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

SQL Basics• SELECT

• gb.Item

• FROM

• Grocery Bag gb, Fruit Basket fb

• WHERE

• gb.Item equals fb.Item

9

gb

fb

Monday, September 23, 13

Page 11: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

SQL Basics• SELECT

• gb.Item

• FROM

• Grocery Bag gb, Fruit Basket fb

• WHERE

• gb.Item equals fb.Item

9

gb

fb

Monday, September 23, 13

Page 12: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Data Dictionary• What are Banner tables and columns named?

• Banner Dynamic Help Query

• Within INB, click a field you want to get information on

• Select Help > Dynamic Help Query

• Popup will usually show you the column name from the database

• When in doubt, ask your technical staff

10

Monday, September 23, 13

Page 13: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Data Dictionary

11

Monday, September 23, 13

Page 14: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Data Dictionary

11

Monday, September 23, 13

Page 15: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Data Dictionary• Oracle Data Dictionary

• Read what Ellucian may have included in the Oracle Data Dictionary

• ALL_TAB_COMMENTS

• ALL_COL_COMMENTS

• Will need to query via a SQL tool (SQL*Plus, SQL Developer, Toad, etc)

• Will need access to query the database directly, and may need additional access to these views

• When in doubt, ask your technical staff

12

Monday, September 23, 13

Page 16: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Data Dictionary• ALL_COL_COMMENTS

13

Monday, September 23, 13

Page 17: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL

• What is a Population Selection (PopSel)?

• Banner gives you a way to create SQL within INB to select students from tables that meet the criteria you specify

• This gives you a way to run processes, reports, or letters against a targeted audience

• PopSels are limited in functionality, especially as the student system becomes more complex, but it is all we have to work with within INB

14

Monday, September 23, 13

Page 18: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL

• Where can I get more help?

• From your Banner Bookshelf, find the Banner General User Guide and readChapter 5 - Population Selection

• Of course, keep your technical staff handy(and happy!)

15

Monday, September 23, 13

Page 19: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL

16

• GLISLCT = Population Selection Inquiry

Monday, September 23, 13

Page 20: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL• GLISLCT = Population Selection Inquiry

• Query PopSels within an Application

• Easy way to browse others and your own (given the name and description are worthwhile)

• Quick way to tell who has run one of your PopSels (let them know if you change something in your SQL code)

17

Monday, September 23, 13

Page 21: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL• GLRSLCT = Population Selection Definition Rules

18

Monday, September 23, 13

Page 22: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL• Application

• Group like PopSels by office or function for easier management

• Selection ID

• Create a meaningful name up to 30 characters

• Creator ID

• Only the Creator can change the PopSel (unless it is copied by another user, but don’t!)

• Description

• Create a meaningful description up to 30 characters19

Monday, September 23, 13

Page 23: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL• Manual

• Banner will auto-join PIDMs between tables, but checking Manual means you want to be in control and do the joins yourself

• Locked

• If checked, only the Creator ID can run the PopSel and view the Extract Inquiry

• Delete

• Delete the PopSel, only after you (and your co-workers) have purged their Extracts from the PopSel

20

Monday, September 23, 13

Page 24: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL• Select

• Must be a _PIDM column that is defined in the data dictionary<table_PIDM>

• From

• Must be a table defined in the data dictionary

• Separate multiple tables with a comma <table1, table2>

• Can assign an alias to a table <table1 alias, table2 alias>

21

Monday, September 23, 13

Page 25: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL• Rules (Where)

• Data Elements

• use LOV button to see Banner version of the data dictionary

• Operator

• [=] equals ; [<>] does not equal

• [>] greater than ; [>=] greater than or equal to[<] less than ; [<=] less than or equal to

• [in] part of a list ; [not in] not part of a list22

Monday, September 23, 13

Page 26: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL• Operator (cont.)

• [like] matches a pattern ; [not like] doesn’t

• use underscore _ for single character

• use percent % for one or more characters

• [is null] empty field ; [is not null] not empty

• don’t type anything in the Value field

• [between] >= low value and <= high value

• use for number and date type columns

• use AND between values (ex: between 1 AND 10)

23

Monday, September 23, 13

Page 27: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL• Value

• Number

• Character

• use single quotes (ex: ‘BSME’)

• Date

• use single quotes (ex: ’20-SEP-2012’)

• don’t use [=] Operator for dates because many Banner dates include a time stamp

24

Monday, September 23, 13

Page 28: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL• Value (cont.)

• Database Column

• Dynamic Parameter

• lets the user enter a value on the fly

• use a meaningful name

• format as &parameter (ex: &AdmitTerm)

• Subquery Variable

• only one per PopSel Definition Rule

• place as the last line of the Rules

• format as (*SUB variable) (ex: (*SUB *MaxEffTerm))

25

Monday, September 23, 13

Page 29: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL• Parenthesis

• allows you to order statements

• up to three nested statements per PopSel

• the number of ( must equal the number of )

• And / Or

• every line but the last should have one

26

Monday, September 23, 13

Page 30: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL• GLIVRBL = Variable Inquiry

27

Monday, September 23, 13

Page 31: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL• GLIVRBL = Variable Inquiry

• Query Variables within an Application

• Easy way to browse all variables (given the name and description are worthwhile)

28

Monday, September 23, 13

Page 32: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL• GLRVRBL = Variable Rule Definitions

29

Monday, September 23, 13

Page 33: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL• GLRVRBL = Variable Rule Definitions

• Allows a creation of a subquery that can help narrow down records, for example when there is a one to many relationship (SGASTDN) or when you need to manipulate a field first (SOAHOLD end date plus 30 days)

• Must use aliases appropriately so the subquery can be embedded in the main query

• These can get complex, so make friends with your technical staff

30

Monday, September 23, 13

Page 34: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL• simple example 1

• Which Banner records have a first name of Zachary, a last name of Hayes, and a middle name that I can’t remember right now but I know it starts with a H?

31

Monday, September 23, 13

Page 35: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL• simple example 1

32

Monday, September 23, 13

Page 36: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL• simple example 2

• Which Banner records have a birthdate equal to 18-FEB-1981?

33

Monday, September 23, 13

Page 37: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL• simple example 2

34

Monday, September 23, 13

Page 38: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL• advanced example

• Which students have an active student status, who were admitted in Term X, who have declared Degree Y, as of Term Z?

35

Monday, September 23, 13

Page 39: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Population Selection SQL• advanced example

36

Monday, September 23, 13

Page 40: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Oracle SQL• PopSels are handy, but what if

• you need more data than just a student ID

• you need more than one subquery

• you need an outer join

• you need data outside of Banner’s standard schema (ex: DegreeWorks database)

• Roll up your sleeves, make friends with your IT staff, and query the tables directly!

• If you have mastered SQL within PopSels, you already have a solid foundation to work from

37

Monday, September 23, 13

Page 41: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Oracle SQL• simple example 1

38

Monday, September 23, 13

Page 42: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Oracle SQL• simple example 2

39

Monday, September 23, 13

Page 43: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner Oracle SQL• advanced example

40

Monday, September 23, 13

Page 44: Banner SQL 101 - University System of GeorgiaBanner Population Selection SQL • What is a Population Selection (PopSel)? • Banner gives you a way to create SQL within INB to select

Banner SQL 101

Questions?

Zachary Hayes

[email protected]

41

Monday, September 23, 13