reports using sql script please check speaker notes for additional information!

22
Reports Using SQL Script Please check speaker notes for additional information!

Upload: finn-axsom

Post on 14-Jan-2016

224 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Reports Using SQL Script Please check speaker notes for additional information!

ReportsUsing SQL Script

Please check speaker notes for additional information!

Page 2: Reports Using SQL Script Please check speaker notes for additional information!

Report scriptReport script

SQL> edit rptslide1

This will bring up the editor (Notepad) so I can create a new script or edit an existing script with the name rptslide1.

These are the column/field names that I want to appear in the report.

These are the column headings. The bar between the words causes a break so the header will appear on two lines.

In the notes, I repeatedly have the message Input truncated to 1 characters (sometimes a different number). The solution is to press ENTER after the / so you have a blank line. That avoids the message.

Page 3: Reports Using SQL Script Please check speaker notes for additional information!

SQL> @ rptslide1

Empl Employee StartId# Name Jo Date Salary Bonus---- -------------------- -- --------- --------- ---------1111 Linda Costa CI 15-JAN-97 45000 10002222 John Davidson IN 25-SEP-92 40000 15003333 Susan Ash AP 05-FEB-00 25000 5004444 Stephen York CM 03-JUL-97 42000 20005555 Richard Jones CI 30-OCT-92 50000 20006666 Joanne Brown IN 18-AUG-94 48000 20007777 Donald Brown CI 05-NOV-99 450008888 Paula Adams IN 12-DEC-98 45000 2000

8 rows selected.

ReportsReportsCLEAR COLUMNSCOLUMN pay_id HEADING 'Employee|Id#'COLUMN name HEADING 'Employee|Name'COLUMN jobcode HEADING 'Job Code'COLUMN startdate HEADING 'Start|Date'COLUMN salary HEADING 'Salary'COLUMN bonus HEADING 'Bonus'/

COLUMN is followed by the name of the column/field from the table that is going to be used. HEADING gives the column heading. Note that the bar between words in heading separates the words onto two lines.

@ means to execute - the code is named rptslide1

Page 4: Reports Using SQL Script Please check speaker notes for additional information!

SQL> SELECT * FROM donor;

EmployeeIDNO Name STADR CITY ST ZIP DATEFST YRGOAL CONTACT----- --------------- --------------- ---------- -- ----- --------- --------- ------------11111 Stephen Daniels 123 Elm St Seekonk MA 02345 03-JUL-98 500 John Smith12121 Jennifer Ames 24 Benefit St Providence RI 02045 24-MAY-97 400 Susan Jones22222 Carl Hersey 24 Benefit St Providence RI 02045 03-JAN-98 Susan Jones23456 Susan Ash 21 Main St Fall River MA 02720 04-MAR-92 100 Amy Costa33333 Nancy Taylor 26 Oak St Fall River MA 02720 04-MAR-92 50 John Adams34567 Robert Brooks 36 Pine St Fall River MA 02720 04-APR-98 50 Amy Costa

6 rows selected.

SQL> SELECT * FROM first_pay;

Empl Employee StartId# Name Jo Date Salary Bonus---- -------------------- -- --------- --------- ---------1111 Linda Costa CI 15-JAN-97 45000 10002222 John Davidson IN 25-SEP-92 40000 15003333 Susan Ash AP 05-FEB-00 25000 5004444 Stephen York CM 03-JUL-97 42000 20005555 Richard Jones CI 30-OCT-92 50000 20006666 Joanne Brown IN 18-AUG-94 48000 20007777 Donald Brown CI 05-NOV-99 450008888 Paula Adams IN 12-DEC-98 45000 2000

8 rows selected.

ReportsReports

Once the report has been executed, whatever table is used in the a SELECT will try to fit the table layout.

Page 5: Reports Using SQL Script Please check speaker notes for additional information!

SQL> clear columnscolumns clearedSQL> SELECT * FROM first_pay;

PAY_ NAME JO STARTDATE SALARY BONUS---- -------------------- -- --------- --------- ---------1111 Linda Costa CI 15-JAN-97 45000 10002222 John Davidson IN 25-SEP-92 40000 15003333 Susan Ash AP 05-FEB-00 25000 5004444 Stephen York CM 03-JUL-97 42000 20005555 Richard Jones CI 30-OCT-92 50000 20006666 Joanne Brown IN 18-AUG-94 48000 20007777 Donald Brown CI 05-NOV-99 450008888 Paula Adams IN 12-DEC-98 45000 2000

8 rows selected.

ReportsReports

Columns have been cleared so the column settings in the script are not used.

Page 6: Reports Using SQL Script Please check speaker notes for additional information!

ReportsReports

CLEAR COLUMNSCOLUMN pay_id HEADING 'Employee|Id#'COLUMN name HEADING 'Employee|Name'COLUMN jobcode HEADING 'Job Code'COLUMN startdate HEADING 'Start|Date'COLUMN salary HEADING 'Salary'COLUMN bonus HEADING 'Bonus'SELECT * FROM first_pay/

SQL> edit rptslide2This is rptslide2 as it appears in the editor (Notepad).

SQL> @ rptslide2

Empl Employee StartId# Name Jo Date Salary Bonus---- -------------------- -- --------- --------- ---------1111 Linda Costa CI 15-JAN-97 45000 10002222 John Davidson IN 25-SEP-92 40000 15003333 Susan Ash AP 05-FEB-00 25000 5004444 Stephen York CM 03-JUL-97 42000 20005555 Richard Jones CI 30-OCT-92 50000 20006666 Joanne Brown IN 18-AUG-94 48000 20007777 Donald Brown CI 05-NOV-99 450008888 Paula Adams IN 12-DEC-98 45000 2000

8 rows selected.

@ rptslide2 runs the script which includes the SELECT so the output is produced.

Page 7: Reports Using SQL Script Please check speaker notes for additional information!

ReportReport

SQL> @ rptslide3

Thu Jun 22 page 1 List of Employees

Empl Employee StartId# Name Jo Date Salary Bonus---- -------------------- -- --------- --------- ---------1111 Linda Costa CI 15-JAN-97 45000 10002222 John Davidson IN 25-SEP-92 40000 15003333 Susan Ash AP 05-FEB-00 25000 5004444 Stephen York CM 03-JUL-97 42000 20005555 Richard Jones CI 30-OCT-92 50000 20006666 Joanne Brown IN 18-AUG-94 48000 20007777 Donald Brown CI 05-NOV-99 450008888 Paula Adams IN 12-DEC-98 45000 2000

8 rows selected.

CLEAR COLUMNSCOLUMN pay_id HEADING 'Employee|Id#'COLUMN name HEADING 'Employee|Name'COLUMN jobcode HEADING 'Job Code'COLUMN startdate HEADING 'Start|Date'COLUMN salary HEADING 'Salary'COLUMN bonus HEADING 'Bonus'SET LINESIZE 65TTITLE 'List of Employees'SELECT * FROM first_pay/

SQL> edit rptslide3

Rptslide3 as it came up in the editor when I keyed in edit rptslide3 at the SQL>

Report that was generated by @rptslide3

SET LINESIZE can be used to establish the length of the line.

TTITLE establishes a title for the report.

Page 8: Reports Using SQL Script Please check speaker notes for additional information!

ReportReport

Thu Jun 22 page 1 List of Employees

Employee Employee Job StartId# Name Code Date Salary Bonus---------- -------------------- ----- ---------- ------------ -----------1111 Linda Costa CI 15-JAN-97 $45,000.00 $1,000.002222 John Davidson IN 25-SEP-92 $40,000.00 $1,500.003333 Susan Ash AP 05-FEB-00 $25,000.00 $500.004444 Stephen York CM 03-JUL-97 $42,000.00 $2,000.005555 Richard Jones CI 30-OCT-92 $50,000.00 $2,000.006666 Joanne Brown IN 18-AUG-94 $48,000.00 $2,000.007777 Donald Brown CI 05-NOV-99 $45,000.008888 Paula Adams IN 12-DEC-98 $45,000.00 $2,000.00

8 rows selected.

SQL> edit rptslide4

SQL> @ rptslide4

CLEAR COLUMNSCOLUMN pay_id HEADING 'Employee|Id#' FORMAT A10COLUMN name HEADING 'Employee|Name' FORMAT A20COLUMN jobcode HEADING 'Job|Code' FORMAT A5COLUMN startdate HEADING 'Start|Date' FORMAT A10COLUMN salary HEADING 'Salary' FORMAT $999,999.99COLUMN bonus HEADING 'Bonus' FORMAT $99,999.99SET LINESIZE 80TTITLE 'List of Employees'SELECT * FROM first_pay/

FORMAT is used to establish the length of the filed or to format using special characters in the numeric fields shown.

Page 9: Reports Using SQL Script Please check speaker notes for additional information!

ReportsReports

Thu Jun 22 page 1 List of Employees

Employee Employee Job StartId# Name Code Date Salary Bonus---------- -------------------- ----- ---------- ------------ -----------3333 Susan Ash AP 05-FEB-00 $25,000.00 $500.001111 Linda Costa CI 15-JAN-97 $45,000.00 $1,000.007777 Donald Brown 05-NOV-99 $45,000.005555 Richard Jones 30-OCT-92 $50,000.00 $2,000.004444 Stephen York CM 03-JUL-97 $42,000.00 $2,000.002222 John Davidson IN 25-SEP-92 $40,000.00 $1,500.008888 Paula Adams 12-DEC-98 $45,000.00 $2,000.006666 Joanne Brown 18-AUG-94 $48,000.00 $2,000.00

8 rows selected.

CLEAR COLUMNSCOLUMN pay_id HEADING 'Employee|Id#' FORMAT A10COLUMN name HEADING 'Employee|Name' FORMAT A20COLUMN jobcode HEADING 'Job|Code' FORMAT A5COLUMN startdate HEADING 'Start|Date' FORMAT A10COLUMN salary HEADING 'Salary' FORMAT $999,999.99COLUMN bonus HEADING 'Bonus' FORMAT $99,999.99SET LINESIZE 80TTITLE 'List of Employees'BREAK ON jobcodeSELECT * FROM first_payORDER BY jobcode/SQL> edit rptslide5

SQL> @ rptslide5

The table has to be ordered by jobcode if you want to break on jobcode.

Page 10: Reports Using SQL Script Please check speaker notes for additional information!

CLEAR COLUMNSCOLUMN pay_id HEADING 'Employee|Id#' FORMAT A10COLUMN name HEADING 'Employee|Name' FORMAT A20COLUMN jobcode HEADING 'Job|Code' FORMAT A5COLUMN startdate HEADING 'Start|Date' FORMAT A10COLUMN salary HEADING 'Salary' FORMAT $999,999.99COLUMN bonus HEADING 'Bonus' FORMAT $99,999.99SET LINESIZE 80TTITLE 'List of Employees'BREAK ON jobcode SKIP 2COMPUTE SUM OF salary ON jobcodeCOMPUTE SUM OF bonus ON jobcodeSELECT * FROM first_payORDER BY jobcode/

I have now added the COMPUTE statement which will compute the SUM of salary and the SUM of bonus based on the jobcode break.

ReportsReports

Page 11: Reports Using SQL Script Please check speaker notes for additional information!

ReportsReports Thu Jun 22 page 1 List of Employees

Employee Employee Job StartId# Name Code Date Salary Bonus---------- -------------------- ----- ---------- ------------ -----------3333 Susan Ash AP 05-FEB-00 $25,000.00 $500.00 ***** ------------ ----------- sum $25,000.00 $500.00

1111 Linda Costa CI 15-JAN-97 $45,000.00 $1,000.007777 Donald Brown 05-NOV-99 $45,000.005555 Richard Jones 30-OCT-92 $50,000.00 $2,000.00 ***** ------------ ----------- sum $140,000.00 $3,000.00

4444 Stephen York CM 03-JUL-97 $42,000.00 $2,000.00 ***** ------------ ----------- sum $42,000.00 $2,000.00

Thu Jun 22 page 2 List of Employees

Employee Employee Job StartId# Name Code Date Salary Bonus---------- -------------------- ----- ---------- ------------ -----------2222 John Davidson IN 25-SEP-92 $40,000.00 $1,500.008888 Paula Adams 12-DEC-98 $45,000.00 $2,000.006666 Joanne Brown 18-AUG-94 $48,000.00 $2,000.00 ***** ------------ ----------- sum $133,000.00 $5,500.00

8 rows selected.

The two SUMS are included based on jobcode break.

Page 12: Reports Using SQL Script Please check speaker notes for additional information!

SQL> CREATE VIEW view_first_pay 2 AS 3 SELECT jobcode, pay_id, name, startdate, salary, bonus 4 FROM first_pay;

View created.

ReportsReports

CLEAR COLUMNSCOLUMN pay_id HEADING 'Employee|Id#' FORMAT A10COLUMN name HEADING 'Employee|Name' FORMAT A20COLUMN jobcode HEADING 'Job|Code' FORMAT A5COLUMN startdate HEADING 'Start|Date' FORMAT A10COLUMN salary HEADING 'Salary' FORMAT $999,999.99COLUMN bonus HEADING 'Bonus' FORMAT $99,999.99SET LINESIZE 80TTITLE 'List of Employees'BREAK ON jobcode SKIP 2COMPUTE SUM OF salary ON jobcodeCOMPUTE SUM OF bonus ON jobcodeSELECT * FROM view_first_payORDER BY jobcode/

SQL> edit rptslide7

I would prefer to have jobcode appear first in my report, so I created a view called view_first_pay from first_pay and put jobcode in as the first column. Then I went into rptslide7 (shown below) and changed the SELECT to use view_first_pay.

Page 13: Reports Using SQL Script Please check speaker notes for additional information!

ReportsReports Thu Jun 22 page 1 List of Employees

Job Employee Employee StartCode Id# Name Date Salary Bonus----- ---------- -------------------- ---------- ------------ -----------AP 3333 Susan Ash 05-FEB-00 $25,000.00 $500.00***** ------------ -----------sum $25,000.00 $500.00

CI 1111 Linda Costa 15-JAN-97 $45,000.00 $1,000.00 7777 Donald Brown 05-NOV-99 $45,000.00 5555 Richard Jones 30-OCT-92 $50,000.00 $2,000.00***** ------------ -----------sum $140,000.00 $3,000.00

CM 4444 Stephen York 03-JUL-97 $42,000.00 $2,000.00***** ------------ -----------sum $42,000.00 $2,000.00

Thu Jun 22 page 2 List of Employees

Job Employee Employee StartCode Id# Name Date Salary Bonus----- ---------- -------------------- ---------- ------------ -----------IN 2222 John Davidson 25-SEP-92 $40,000.00 $1,500.00 8888 Paula Adams 12-DEC-98 $45,000.00 $2,000.00 6666 Joanne Brown 18-AUG-94 $48,000.00 $2,000.00***** ------------ -----------sum $133,000.00 $5,500.00

8 rows selected.

Note that jobcode is now in the first column.

Page 14: Reports Using SQL Script Please check speaker notes for additional information!

CLEAR COLUMNSCOLUMN pay_id HEADING 'Employee|Id#' FORMAT A10COLUMN name HEADING 'Employee|Name' FORMAT A20COLUMN jobcode HEADING 'Job|Code' FORMAT A5COLUMN startdate HEADING 'Start|Date' FORMAT A10COLUMN salary HEADING 'Salary' FORMAT $999,999.99COLUMN bonus HEADING 'Bonus' FORMAT $99,999.99SET LINESIZE 80TTITLE 'List of Employees'BREAK ON REPORTCOMPUTE SUM OF salary ON REPORTCOMPUTE SUM OF bonus ON REPORTSELECT * FROM first_payORDER BY jobcode/

ReportsReports

SQL> @ rptslide8

Thu Jun 22 page 1 List of Employees

Employee Employee Job StartId# Name Code Date Salary Bonus---------- -------------------- ----- ---------- ------------ -----------3333 Susan Ash AP 05-FEB-00 $25,000.00 $500.001111 Linda Costa CI 15-JAN-97 $45,000.00 $1,000.007777 Donald Brown CI 05-NOV-99 $45,000.005555 Richard Jones CI 30-OCT-92 $50,000.00 $2,000.004444 Stephen York CM 03-JUL-97 $42,000.00 $2,000.002222 John Davidson IN 25-SEP-92 $40,000.00 $1,500.008888 Paula Adams IN 12-DEC-98 $45,000.00 $2,000.006666 Joanne Brown IN 18-AUG-94 $48,000.00 $2,000.00 ------------ -----------sum $340,000.00 $11,000.00

8 rows selected.

BREAK ON REPORT generates final totals.

Page 15: Reports Using SQL Script Please check speaker notes for additional information!

Thu Jun 22 page 1 List of Employees

Employee Employee Job StartId# Name Code Date Salary Bonus---------- -------------------- ----- ---------- ------------ -----------3333 Susan Ash AP 05-FEB-00 $25,000.00 $500.001111 Linda Costa CI 15-JAN-97 $45,000.00 $1,000.007777 Donald Brown CI 05-NOV-99 $45,000.005555 Richard Jones CI 30-OCT-92 $50,000.00 $2,000.004444 Stephen York CM 03-JUL-97 $42,000.00 $2,000.002222 John Davidson IN 25-SEP-92 $40,000.00 $1,500.008888 Paula Adams IN 12-DEC-98 $45,000.00 $2,000.006666 Joanne Brown IN 18-AUG-94 $48,000.00 $2,000.00 ------------ -----------avg $42,500.00maximum $2,000.00

ReportsReports CLEAR COLUMNSCOLUMN pay_id HEADING 'Employee|Id#' FORMAT A10COLUMN name HEADING 'Employee|Name' FORMAT A20COLUMN jobcode HEADING 'Job|Code' FORMAT A5COLUMN startdate HEADING 'Start|Date' FORMAT A10COLUMN salary HEADING 'Salary' FORMAT $999,999.99COLUMN bonus HEADING 'Bonus' FORMAT $99,999.99SET LINESIZE 80TTITLE 'List of Employees'BREAK ON REPORTCOMPUTE AVG OF salary ON REPORTCOMPUTE MAX OF bonus ON REPORTSELECT * FROM first_payORDER BY jobcode/

Page 16: Reports Using SQL Script Please check speaker notes for additional information!

CLEAR COLUMNSCOLUMN pay_id HEADING 'Employee|Id#' FORMAT A10COLUMN name HEADING 'Employee|Name' FORMAT A20COLUMN jobcode HEADING 'Job|Code' FORMAT A5COLUMN startdate HEADING 'Start|Date' FORMAT A10COLUMN salary HEADING 'Salary' FORMAT $999,999.99COLUMN bonus HEADING 'Bonus' FORMAT $99,999.99SET LINESIZE 80TTITLE 'List of Employees'BREAK ON REPORT ON jobcode SKIP 2COMPUTE SUM OF salary ON jobcodeCOMPUTE SUM OF bonus ON jobcodeCOMPUTE SUM OF salary ON REPORTCOMPUTE SUM OF bonus ON REPORTSELECT * FROM view_first_payORDER BY jobcode/

ReportsReportsThis is rptslide10 as it appears in the editor. Note that it has break on report and jobcode and that it has totals for both.

On the BREAK line, the break that covers the most information (REPORT) is listed first and then the break that covers a smaller group of information (jobcode) is listed next.

Page 17: Reports Using SQL Script Please check speaker notes for additional information!

SQL> @ rptslide10

Fri Jun 23 page 1 List of Employees

Job Employee Employee StartCode Id# Name Date Salary Bonus----- ---------- -------------------- ---------- ------------ -----------AP 3333 Susan Ash 05-FEB-00 $25,000.00 $500.00***** ------------ -----------sum $25,000.00 $500.00

CI 1111 Linda Costa 15-JAN-97 $45,000.00 $1,000.00 7777 Donald Brown 05-NOV-99 $45,000.00 5555 Richard Jones 30-OCT-92 $50,000.00 $2,000.00***** ------------ -----------sum $140,000.00 $3,000.00

CM 4444 Stephen York 03-JUL-97 $42,000.00 $2,000.00***** ------------ -----------sum $42,000.00 $2,000.00

Fri Jun 23 page 2 List of Employees

Job Employee Employee StartCode Id# Name Date Salary Bonus----- ---------- -------------------- ---------- ------------ -----------IN 2222 John Davidson 25-SEP-92 $40,000.00 $1,500.00 8888 Paula Adams 12-DEC-98 $45,000.00 $2,000.00 6666 Joanne Brown 18-AUG-94 $48,000.00 $2,000.00***** ------------ -----------sum $133,000.00 $5,500.00

------------ -----------sum $340,000.00 $11,000.00

ReportsReports

Page 18: Reports Using SQL Script Please check speaker notes for additional information!

SHOW ALLSHOW ALL SQL> SHOW ALLappinfo is ON and set to "SQL*Plus"arraysize 15autocommit OFFautoprint OFFautotrace OFFblockterminator "." (hex 2e)btitle OFF and is the 1st few characters of the next SELECT statementclosecursor OFFcmdsep OFFcolsep " "compatibility NATIVEconcat "." (hex 2e)copycommit 0copytypecheck is ONcrt ""define "&" (hex 26)echo OFFeditfile "afiedt.buf"embedded OFFescape OFFfeedback ON for 6 or more rowsflagger OFFflush ONheading ONheadsep "|" (hex 7c)linesize 80lno 25long 80longchunksize 80maxdata 60000newpage 1non-blocking ONnull ""numformat ""numwidth 9

Page 19: Reports Using SQL Script Please check speaker notes for additional information!

pagesize 24pause is OFFpno 2recsep WRAPrecsepchar " " (hex 20)release 703020200repfooter OFF and is NULLrepheader OFF and is NULLserveroutput OFFshowmode OFFspool OFFsqlcase MIXEDsqlcode 0sqlcontinue "> "sqlnumber ONsqlprefix "#" (hex 23)sqlprompt "SQL> "sqlterminator ";" (hex 3b)suffix "SQL"tab ONtermout ONtime OFFtiming OFFtrimout ONtrimspool OFFttitle ON and is the following 17 characters:List of Employeesunderline "-" (hex 2d)user is "SCOTT"verify ONshiftinout INVISIBLEwrap : lines will be wrapped

SHOW ALLSHOW ALL

Page 20: Reports Using SQL Script Please check speaker notes for additional information!

SQL> clear columnscolumns clearedSQL> clear breaksbreaks clearedSQL> ttitle offSQL> SELECT * FROM first_pay;

PAY_ NAME JO STARTDATE SALARY BONUS---- -------------------- -- --------- --------- ---------1111 Linda Costa CI 15-JAN-97 45000 10002222 John Davidson IN 25-SEP-92 40000 15003333 Susan Ash AP 05-FEB-00 25000 5004444 Stephen York CM 03-JUL-97 42000 20005555 Richard Jones CI 30-OCT-92 50000 20006666 Joanne Brown IN 18-AUG-94 48000 20007777 Donald Brown CI 05-NOV-99 450008888 Paula Adams IN 12-DEC-98 45000 2000

8 rows selected.

Clearing report environment.

Clearing report environment. Once you have created the report type

environment using the report script you have to reverse it to return to get the ordinary results from the SELECT * FROM first_pay; type of command.

As shown this can be done with clear columns and clear breaks and with turning features from the SHOW ALL list off or on as needed.

Page 21: Reports Using SQL Script Please check speaker notes for additional information!

SQL> COLUMN salary HEADING 'Salary' FORMAT $999,999.99SQL> SELECT * FROM first_pay;

PAY_ NAME JO STARTDATE Salary BONUS---- -------------------- -- --------- ------------ ---------1111 Linda Costa CI 15-JAN-97 $45,000.00 10002222 John Davidson IN 25-SEP-92 $40,000.00 15003333 Susan Ash AP 05-FEB-00 $25,000.00 5004444 Stephen York CM 03-JUL-97 $42,000.00 20005555 Richard Jones CI 30-OCT-92 $50,000.00 20006666 Joanne Brown IN 18-AUG-94 $48,000.00 20007777 Donald Brown CI 05-NOV-99 $45,000.008888 Paula Adams IN 12-DEC-98 $45,000.00 2000

8 rows selected.

EnvironmentEnvironment

With this setting I am saying that this is the format I want used for any column named salary. The table doesn’t matter, it is the column name salary that has been given a heading and formatting.

Page 22: Reports Using SQL Script Please check speaker notes for additional information!

SQL> COLUMN pay_id HEADING 'Pay Id #' FORMAT A10SQL> SELECT * FROM first_pay;

Pay Id # NAME JO STARTDATE Salary BONUS---------- -------------------- -- --------- ------------ ---------1111 Linda Costa CI 15-JAN-97 $45,000.00 10002222 John Davidson IN 25-SEP-92 $40,000.00 15003333 Susan Ash AP 05-FEB-00 $25,000.00 5004444 Stephen York CM 03-JUL-97 $42,000.00 20005555 Richard Jones CI 30-OCT-92 $50,000.00 20006666 Joanne Brown IN 18-AUG-94 $48,000.00 20007777 Donald Brown CI 05-NOV-99 $45,000.008888 Paula Adams IN 12-DEC-98 $45,000.00 2000

8 rows selected.

environmentenvironment

In this example, I have increased the size of the column where the pay_id will be displayed. I have also changed the heading. This would apply to any table with a column/field called pay_id.