tailieunhanh - Oracle Built−in Packages- P101
Oracle Built−in Packages- P101: Ah, for the good old days of Version of PL /SQL! Life was so simple then. No stored procedures or functions and certainly no packages. You had your set of built−in functions, like SUBSTR and TO_DATE. You had the IF statement and various kinds of loops. With these tools at hand, you built your batch−processing scripts for execution in SQL*Plus, and you coded your triggers in SQL*Forms , and you went home at night content with a good day's work done. | Appendix A What s on the Companion Disk If there is a second part display that. IF part2 IS NOT NULL THEN Name part2 END IF ELSE No first part of name. Just display second part. object_type part1_type part2 END IF Display the database link if it is present. IF dblink IS NOT NULL THEN Database Link dblink END IF END IF END The procedure This procedure calls the PL SQL parser to parse the given name that is in the following format a . b . c @dblink where dblink is the name of a database link. Here s the header for the procedure PROCEDURE name IN VARCHAR2 a OUT VARCHAR2 b OUT VARCHAR2 c OUT VARCHAR2 dblink OUT VARCHAR2 nextpos OUT BINARY_INTEGER Parameters are summarized in the following table. Parameter Description name Name being parsed a b c Components of name if present dblink Name of database link nextpos Position where next token starts NAME_TOKENIZE follows these rules Strips off all double quotes Converts to uppercase if there are no quotes The DBMS_UTILITY Interface 491 Appendix A What s on the Companion Disk Ignores any inline comments Does no semantic analysis Leaves any missing values as NULL The function The PORT_STRING function returns a string that uniquely identifies the version of Oracle Server and the platform or operating system of the current database instance. The specification for this function follows FUNCTION RETURN VARCHAR2 Running the PORT_STRING function in Oracle8 on Windows NT for example returns the following string IBMPC The maximum length of the string returned by this function is operating system-specific. The procedure The TABLE_TO_COMMA procedure converts a PL SQL table into a comma-delimited list. Here s the header for this procedure PROCEDURE tab IN UNCL_ARRAY .
đang nạp các trang xem trước