TAILIEUCHUNG - Oracle PL/SQL Language Pocket Reference- P12

Oracle PL/SQL Language Pocket Reference- P12: This pocket guide features quick-reference information to help you use Oracle's PL/SQL language. It includes coverage of PL/SQL features in the newest version of Oracle, Oracle8i. It is a companion to Steven Feuerstein and Bill Pribyl's bestselling Oracle PL/SQL Programming. Updated for Oracle8, that large volume (nearly 1,000 pages) fills a huge gap in the Oracle market, providing developers with a single, comprehensive guide to building applications with PL/SQL and building them the right way. . | 3. Using another exception section within the first exception section trap this exception as the else in this pseudo-IF statement. Within the exception handler try to convert the string with TO_DATE and the third mask MM YY. If it works I am done. If it doesn t work an exception is raised. 4. I have only three masks so if I cannot convert the string after these three TO_DATE calls the user entry is invalid and I will simply return NULL. The function convert_date that follows illustrates the full PL SQL version of the preceding pseudocode description. I make liberal use of the WHEN OTHERS exception handler because I have no way of knowing which exception would have been raised by the conversion attempt FUNCTION convert_date value_in IN VARCHAR2 RETURN DATE IS return_value DATE BEGIN IF value_int IS NULL THEN return_value NULL ELSE BEGIN IF MM DD YY mask works set return value. return_value TO_DATE value_in MM DD YY EXCEPTION OTHERWISE WHEN OTHERS THEN BEGIN IF DD-MON-YY mask works set return value. return_value TO_DATE value_in DD-MON-YY EXCEPTION OTHERWISE WHEN OTHERS THEN BEGIN IF MM YY mask works set return value. return_value TO_DATE value_in MM YY EXCEPTION OTHERWISE RETURN NULL. WHEN OTHERS THEN return_value NULL END END END END IF RETURN return_value END Please purchase PDF Split-Merge on to remove this watermark. Previous NO_DATA_FOUND Multipurpose Exception NO_DATA_FOUND Multipurpose Exception Oracle PL SQL Programming 2nd Edition Book Index Next RAISE Nothing but Exceptions RAISE Nothing but Exceptions The Oracle Library Navigation Copyright c 2000 O Reilly Associates. All rights reserved. Please purchase PDF Split-Merge on to remove this watermark. Chapter 8 Next 9. Records in PL SQL Previous Exception Handler as IF Statement Exception Handlers RAISE Nothing but Exceptions Have you noticed that the RAISE statement acts in many ways like a GOTO statement The GOTO statement in PL SQL looks like this

Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.