Oracle4B-2_Spool_Chen_Jason

Oracle4B-2_Spool_Chen_Jason - - Jason Chen SQL>...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
-- Jason Chen SQL> --Ch4BCase1.sql SQL> SQL> SET SERVEROUTPUT ON SQL> DECLARE 2 CURSOR c_cursor IS 3 SELECT c_last, c_first, c_mi, c_address, 4 c_city, c_state, c_zip, c_dphone 5 FROM customer; 6 C_LAST VARCHAR2(30); 7 C_FIRST VARCHAR2(30); 8 C_MI CHAR(1); 9 C_ADDRESS VARCHAR2(30); 10 C_CITY VARCHAR2(30); 11 C_STATE CHAR(2); 12 C_ZIP VARCHAR2(10); 13 C_DPHONE VARCHAR2(10); 14 curr_customer_name VARCHAR2(120); 15 BEGIN 16 OPEN c_cursor; 17 DBMS_OUTPUT.PUT_LINE('Clearwater Traders Mailing List'); 18 LOOP 19 FETCH c_cursor 20 INTO c_last, c_first, c_mi, c_address, 21 c_city, c_state, c_zip, c_dphone; 22 EXIT WHEN c_cursor%NOTFOUND; 23 curr_customer_name := c_first ||' '||C_MI||' '|| 24 c_last||' '||c_address||' '||c_city||' '|| 25 c_state||' '||c_zip||' '||c_dphone; 26 DBMS_OUTPUT.PUT_LINE(curr_customer_name); 27 END LOOP; 28 CLOSE c_cursor; 29 END; 30 / Clearwater Traders Mailing List Neal R Graham 9815 Circle Dr. Tallahassee FL 32308 9045551897 Myra T Sanchez 172 Alto Park Seattle WA 42180 4185551791 Lisa M Smith 850 East Main Santa Ana CA 51875 3075557841 Paul Phelp 994 Kirkman Rd. Northpoint NY 11795 4825554788 Sheila A Lewis 195 College Blvd. Newton GA 37812 3525554972 Thomas E James 348 Rice Lane Radcliff WY 87195 7615553485 T PL/SQL procedure successfully completed. P SQL> -- Jason Chen SQL> --Ch4BCase2.sql
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 4

Oracle4B-2_Spool_Chen_Jason - - Jason Chen SQL>...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online