Andre Long CISP 350 Oracle April 27, 2006 Chapter 4B PSC CASE#3 a) DECLARE time_zone VARCHAR2(3):= 'PST'; mess1 VARCHAR2(40):= 'The current time in New York City is '; mess2 VARCHAR2(40):= 'The current time in Chicago is '; mess3 VARCHAR2(40):= 'The current time in Honolulu is '; mess4 VARCHAR2(40):= 'The current time in the Yukon is '; mess5 VARCHAR2(40):= 'The current time in London is '; nyc_time DATE; chi_time DATE; hon_time DATE; yuk_time DATE; lon_time DATE; other_time VARCHAR2(3); BEGIN other_time :='EST'; IF other_time = 'EST' THEN nyc_time:= NEW_TIME(SYSDATE,time_zone,other_time); DBMS_OUTPUT.PUT_LINE(mess1 || TO_CHAR(nyc_time, 'HH:MM:SS AM')); other_time :='CST'; END IF; IF other_time = 'CST' THEN chi_time:= NEW_TIME(SYSDATE,time_zone,other_time); DBMS_OUTPUT.PUT_LINE(mess2 || TO_CHAR(chi_time, 'HH:MM:SS AM')); other_time :='HST'; END IF; IF other_time = 'HST' THEN hon_time:= NEW_TIME(SYSDATE,time_zone,other_time); DBMS_OUTPUT.PUT_LINE(mess3 || TO_CHAR(hon_time, 'HH:MM:SS AM')); other_time :='YST'; END IF; IF other_time = 'YST' THEN yuk_time:= NEW_TIME(SYSDATE,time_zone,other_time); DBMS_OUTPUT.PUT_LINE(mess4 || TO_CHAR(yuk_time, 'HH:MM:SS AM')); other_time :='GMT'; END IF; IF other_time = 'GMT' THEN lon_time:= NEW_TIME(SYSDATE,time_zone,other_time); DBMS_OUTPUT.PUT_LINE(mess5 || TO_CHAR(lon_time, 'HH:MM:SS AM')); END IF; END;