title: oct 299:30 am (1 of 18)cisweb.bristolcc.edu/~pgrocer/audio_smartboardf19/cis150/... · 2019....

18
Title: Oct 299:30 AM (1 of 18)

Upload: others

Post on 24-Jan-2021

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Title: Oct 299:30 AM (1 of 18)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF19/CIS150/... · 2019. 10. 29. · PL/SQL procedure successfully completed. SQL> SELECT FROM IDNO NAME

Title: Oct 29­9:30 AM (1 of 18)

Page 2: Title: Oct 299:30 AM (1 of 18)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF19/CIS150/... · 2019. 10. 29. · PL/SQL procedure successfully completed. SQL> SELECT FROM IDNO NAME

Using the sequence to provide the v_idno.

Title: Oct 29­9:42 AM (2 of 18)

Page 3: Title: Oct 299:30 AM (1 of 18)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF19/CIS150/... · 2019. 10. 29. · PL/SQL procedure successfully completed. SQL> SELECT FROM IDNO NAME

Using the prompt to take in the information to insert in the table.

Title: Oct 29­9:44 AM (3 of 18)

Page 4: Title: Oct 299:30 AM (1 of 18)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF19/CIS150/... · 2019. 10. 29. · PL/SQL procedure successfully completed. SQL> SELECT FROM IDNO NAME

Title: Oct 29­9:45 AM (4 of 18)

Page 5: Title: Oct 299:30 AM (1 of 18)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF19/CIS150/... · 2019. 10. 29. · PL/SQL procedure successfully completed. SQL> SELECT FROM IDNO NAME

Doing a calculation and an update of the specified record.

Title: Oct 29­9:46 AM (5 of 18)

Page 6: Title: Oct 299:30 AM (1 of 18)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF19/CIS150/... · 2019. 10. 29. · PL/SQL procedure successfully completed. SQL> SELECT FROM IDNO NAME

Title: Oct 29­9:47 AM (6 of 18)

Page 7: Title: Oct 299:30 AM (1 of 18)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF19/CIS150/... · 2019. 10. 29. · PL/SQL procedure successfully completed. SQL> SELECT FROM IDNO NAME

Title: Oct 29­9:48 AM (7 of 18)

Page 8: Title: Oct 299:30 AM (1 of 18)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF19/CIS150/... · 2019. 10. 29. · PL/SQL procedure successfully completed. SQL> SELECT FROM IDNO NAME

Please be sure to go over these.

Creating and emptying the table I am goingto use.

Title: Oct 29­9:51 AM (8 of 18)

Page 9: Title: Oct 299:30 AM (1 of 18)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF19/CIS150/... · 2019. 10. 29. · PL/SQL procedure successfully completed. SQL> SELECT FROM IDNO NAME

Title: Oct 29­9:56 AM (9 of 18)

Page 10: Title: Oct 299:30 AM (1 of 18)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF19/CIS150/... · 2019. 10. 29. · PL/SQL procedure successfully completed. SQL> SELECT FROM IDNO NAME

Title: Oct 29­9:58 AM (10 of 18)

Page 11: Title: Oct 299:30 AM (1 of 18)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF19/CIS150/... · 2019. 10. 29. · PL/SQL procedure successfully completed. SQL> SELECT FROM IDNO NAME

Title: Oct 29­9:59 AM (11 of 18)

Page 12: Title: Oct 299:30 AM (1 of 18)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF19/CIS150/... · 2019. 10. 29. · PL/SQL procedure successfully completed. SQL> SELECT FROM IDNO NAME

Title: Oct 29­10:02 AM (12 of 18)

Page 13: Title: Oct 299:30 AM (1 of 18)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF19/CIS150/... · 2019. 10. 29. · PL/SQL procedure successfully completed. SQL> SELECT FROM IDNO NAME

I am only inserting certain records.See how this can be handled differently in the cursor on the next slide.

Title: Oct 29­10:04 AM (13 of 18)

Page 14: Title: Oct 299:30 AM (1 of 18)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF19/CIS150/... · 2019. 10. 29. · PL/SQL procedure successfully completed. SQL> SELECT FROM IDNO NAME

Now the cursor will only contain records where yrgoal is greater than 50.

Title: Oct 29­10:09 AM (14 of 18)

Page 15: Title: Oct 299:30 AM (1 of 18)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF19/CIS150/... · 2019. 10. 29. · PL/SQL procedure successfully completed. SQL> SELECT FROM IDNO NAME

Title: Oct 29­10:19 AM (15 of 18)

Page 16: Title: Oct 299:30 AM (1 of 18)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF19/CIS150/... · 2019. 10. 29. · PL/SQL procedure successfully completed. SQL> SELECT FROM IDNO NAME

Note the different loop and the exit when the cursor is not found.

Title: Oct 29­10:32 AM (16 of 18)

Page 17: Title: Oct 299:30 AM (1 of 18)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF19/CIS150/... · 2019. 10. 29. · PL/SQL procedure successfully completed. SQL> SELECT FROM IDNO NAME

Exit the loop based on rowcount and if thereare not enough records to cause this exit, exitwhen the cursor is not found.

Title: Oct 29­10:34 AM (17 of 18)

Page 18: Title: Oct 299:30 AM (1 of 18)cisweb.bristolcc.edu/~pgrocer/audio_smartboardF19/CIS150/... · 2019. 10. 29. · PL/SQL procedure successfully completed. SQL> SELECT FROM IDNO NAME

Title: Oct 29­10:49 AM (18 of 18)