... illustrates the PL/ SQL engine residing on the Oracle server When the PL/ SQL engine is located on the server, the whole PL/ SQL block is passed to the PL/ SQL engine on the Oracle server The PL/ SQL engine ... result, you see rows displayed on your client machine PL/ SQL Block PL/ SQL and SQL Statements PL/ SQL Block PL/ SQL Statements PL/ SQL Statement Processor PL/ SQL Engine SQL Statements SQL Statement Processor ... enables the PL/ SQL compiler to rearrange PL/ SQL code to enhance performance The optimization level used by the PL/ SQL compiler is controlled by the PLSQL_OPTIMIZE_ LEVEL parameter Its values range...
Ngày tải lên: 24/12/2013, 02:18
... DBMS_OUTPUT is then used to show the result to the screen B) Take the same PL/ SQL block, and place the line with the DBMS_OUTPUT before the SELECT INTO statement What is displayed on the SQL* Plus screen? ... In the preceding example, add the following expressions to the beginning of the procedure (immediately after the BEGIN) Then explain the values of the variables at the beginning and end of the ... Use the Select INTO Syntax for Variable Initialization A) Execute the script ch03_1a .sql What is displayed on the SQL* Plus screen? Explain the results ANSWER: You see the following result: The...
Ngày tải lên: 21/01/2014, 08:20
Tài liệu Oracle PL/SQL by Example- P3 pdf
... you use the CASE statement to display the name of a day on the screen based on the day’s number in the week In other words, if the number of the day of the week is 3, it is Tuesday Create the following ... v_remainder: PL/ SQL procedure successfully completed In the first run, is not divisible by 2, so the NULLIF function returns the value of the remainder In the second run, is divisible by 2, so the NULLIF ... example is almost identical to the previous example In the previous example, the variable v_num_flag was used as a selector, and the result of the MOD function was assigned to it The value of the...
Ngày tải lên: 21/01/2014, 08:20
Tài liệu Oracle PL/SQL by Example- P4 doc
... from the lower limit to the upper limit, the statements inside the body of the loop are executed When the value of the loop counter does not satisfy the range specified by the lower limit and the ... decreased by and displayed on the screen Notice that the number of times the body of the loop is executed is not affected by the option used, IN or IN REVERSE Only the values assigned to the lower ... incremented and displayed on the screen The newly created script adds the CONTINUE condition, which affects the output produced by the script Create the following PL/ SQL script: ch07_1a .sql, version...
Ngày tải lên: 21/01/2014, 08:20
Tài liệu Oracle PL/SQL by Example- P5 docx
... occurred in the program PL/ SQL procedure successfully completed In this example, the PL/ SQL block is enclosed by another block, and the program can complete This is possible because the exception ... this example produces the following output: An error has occurred in the program PL/ SQL procedure successfully completed In this example, the PL/ SQL block is enclosed in another block, and the program ... in the output generated by the second version of the example looks like the error message generated by the system, because the error number ORA-20000 precedes the error message The RAISE_APPLICATION_ERROR...
Ngày tải lên: 21/01/2014, 08:20
Tài liệu Oracle PL/SQL by Example- P6 pptx
... of the PL/ SQL block The SQLERRM function accepts the value of the SQLCODE in the second DBMS_ OUTPUT.PUT_LINE statement In the following DBMS_OUPUT.PUT_LINE statements, SQLERRM accepts the values ... built-in functions, SQLCODE and SQLERRM, used with the OTHERS exception handler The SQLCODE function returns the Oracle error number, and the SQLERRM function returns the error message The maximum length ... c_student; The code is not complete because there is not a proper way to exit the loop E) Explain what is occurring in the following PL/ SQL block What will be the output from this example? FOR EXAMPLE...
Ngày tải lên: 21/01/2014, 08:20
Tài liệu Oracle PL/SQL by Example- P7 docx
... z.zip); Note that the SELECT statement is written in the ANSI 1999 SQL standard BY THE WAY You will find detailed explanations and examples of the statements using the new ANSI 1999 SQL standard in ... assigned values based on the v_date and v_user variables For the UPDATE operation, the CREATED _BY and CREATED_DATE columns not change their values As a result, the values are copied from the OLD ... should record in the STATISTICS table the type of the transaction, the name of the user who issued the transaction, the date of the transaction, and how many records are affected by the transaction...
Ngày tải lên: 21/01/2014, 08:20
Tài liệu Oracle PL/SQL by Example- P8 pptx
... issued, PL/ SQL keeps placeholders of the deleted elements Therefore, the first call of the TRIM method removes the ninth and tenth elements of the nested table, and the second call of the TRIM ... the script by adding the following statements, and explain the output produced: I) Delete the last element of the nested table, and then assign a new value to it Execute the script II) Trim the ... In the current version of the script, the last element of the nested table is removed using the TRIM method In this case, PL/ SQL does not keep a placeholder of the trimmed element, because the...
Ngày tải lên: 21/01/2014, 08:20
Tài liệu Oracle PL/SQL by Example- P9 pdf
... Chapter 1, PL/ SQL Concepts,” you learned that the PL/ SQL engine sends SQL statements to the SQL engine, which returns results to the PL/ SQL engine The communication between the PL/ SQL and SQL engines ... from PL/ SQL to SQL ten times In other words, ten context switches take place If you replace the FOR loop with the FORALL statement, the INSERT statement is sent only once from PL/ SQL to SQL, ... studentGROUP BY zip causes this error: ERROR: ORA-00933: SQL command not properly ended PL/ SQL procedure successfully completed Execute the script, and then complete the following exercises: A) Explain the...
Ngày tải lên: 21/01/2014, 08:20
Tài liệu Oracle PL/SQL by Example- P10 ppt
... either in SQL* Plus or in one of the many tools for creating and debugging stored PL/ SQL code If you are using SQL* Plus, you need to write your code in a text editor and then run it at the SQL* Plus ... everything after the AS keyword The word REPLACE is optional When REPLACE is not used in the header of the procedure, to change the code in the procedure, you must drop and then re-create the procedure ... procedures Parameters are the means to pass values to and from the calling environment to the server These are the values that are processed or returned by executing the procedure The three types of...
Ngày tải lên: 21/01/2014, 08:20
Tài liệu Oracle PL/SQL by Example- P11 docx
... see the Grade Type Description rather than the Grade Type Code, then you can use the DESCRIPTION column in the GRADE_TYPE table rather then the GRADE_TYPE_CODE, which was used in the previous SQL ... BY OBJECT_TYPE; B) Type the following script into a text file, and run the script in SQL* Plus It creates the function scode_at_line Explain the purpose of this function What is accomplished by ... to the Basic Language The last method is to pass neither the student ID nor the instructor ID: SQL> exec course_pkg.get_course_list(NULL, NULL, :course_cv); PL/ SQL procedure successfully completed...
Ngày tải lên: 21/01/2014, 08:20
Tài liệu Oracle PL/SQL by Example- P12 pptx
... Oracle The SQL execution plan and runtime statistics are stored in V $SQL_ PLAN V $SQL and PLAN_STATISTICS are displayed with the DBMS_XPLAN package The SQL command for creating an explain plan takes ... version of the script, the cursor FOR loop has been replaced by the BULK SELECT INTO statement As a result, the cursor FOR loop is replaced by the numeric FOR loop to display data on the screen These ... Connected SQL> @$ORACLE_HOME/rdbms/admin/utlxplan .sql SQL> GRANT ALL ON sys.plan_table TO public; SQL> CREATE PUBLIC SYNONYM plan_table FOR sys.plan_table; By default, if several plans in the plan...
Ngày tải lên: 26/01/2014, 08:20
Tài liệu Oracle PL/SQL by Example- P13 pdf
... functionality THE APPLICATION SERVER TIER: THE PL/ SQL GATEWAY The PL/ SQL Gateway enables you to call PL/ SQL programs from a Web browser The PL/ SQL programs run on the server and return HTML to the browser ... cases, the explain plan is not what you expect to see This may be because the SQL was adjusted by having a QUERY RE-WRITE setting turned on The resulting explain plan is for the SQL that the database ... JSP In the example used here, where all HTML files are being generated by PL/ SQL stored procedures by means of Oracle Application Server 10g, another PL/ SQL procedure is the action of the HTML...
Ngày tải lên: 26/01/2014, 08:20
Tài liệu Oracle PL/SQL by Example- P14 pptx
... which the original PL/ SQL block (the PL/ SQL block from the original script) has been enclosed in another block: SET SERVEROUTPUT ON Outer PL/ SQL block BEGIN This block became inner PL/ SQL block ... included in the results of the SELECT statement Note that the SELECT statement uses the ANSI 1999 SQL standard BY THE WAY You will find detailed explanations and examples of the statements using the ... should record in the STATISTICS table the type of the transaction, the name of the user who issued the transaction, and the date of the transaction Assume that the STATISTICS table has the following...
Ngày tải lên: 26/01/2014, 08:20
Tài liệu Oracle PL/SQL by Example- P15 pptx
... null If any of these incoming values are null, the constructor function populates the corresponding attributes with the default values based on the system functions USER and SYSDATE The second constructor ... variable of the user-defined record type, name_addr_rec_type Because this record type is defined in the package DYNAMIC _SQL_ PKG, the name of the record type is prefixed with the name of the package ... Similarly, the name of the package is added to the procedure call statement When run, this script produces the following output The first output is against the STUDENT table, and the second output...
Ngày tải lên: 26/01/2014, 08:20
Tài liệu Oracle PL/SQL by Example- P16 doc
... projects, 493, 681-690 PL/ SQL in client/ server architecture, 19, 613-614 PL/ SQL in SQL* Plus, 19, 613-614 procedure projects, 447, 673-678 current_status procedure, 673-674 dynamic _sql_ pkg procedure, ... option, 408-409 simple examples, 405-408 structure, 404-405 VALUES OF option, 411-412 IF-THEN example, 54-56 overview, 54 syntax, 54 testing whether date falls on weekend, 58-61 IF-THEN-ELSE checking ... 627-628 simple loops, 628-629 WHILE loops, 626-627 object type projects, 554, 696-703 package projects, 493, 681-690 PL/ SQL in client/server architecture, 19, 613-614 PL/ SQL in SQL* Plus, 19, 613-614...
Ngày tải lên: 26/01/2014, 08:20
Tài liệu Retrieve Results from SQL Server by Using the DataTable Object docx
... this chapter The data table is then filled, and then the DataSource, DisplayMember, and ValueMember properties of the ListBox control are assigned Comments Using the data table sets up the scene ... it in strSQL, the data adapter called odaCust is created The odtCust data table is then filled using odaCust Last, the DataSource, DisplayMember, and ValueMember properties are set for the lstCustomers ... button, the data adapter called odaCust is instantiated The data adapter is passed strSQL and the connection string that is created by the function called BuildCnnStr, which was introduced in the...
Ngày tải lên: 26/01/2014, 11:20
báo cáo hóa học:" Preferences of diabetes patients and physicians: A feasibility study to identify the key indicators for appraisal of health care values" doc
... related to the mode of application and the type of product These factors and the factor levels were used for the following conjoint procedure Four steps to complete the conjoint measurement The participants ... may play an important role in the trade off of different properties of a therapy but not all therapies may cover the patients’ preferences The obtained information is rather important as the ... this study will also apply to patients in other cultures because the identification process in the focus group was based on a rather small sample and the method for selecting the factors was not...
Ngày tải lên: 20/06/2014, 15:20
The Key Concepts Routledge Key Guides by Chris Rowley and Keith Jackson_1 potx
... of agreed terms and conditions For the employer, the contract expresses a reciprocal promise: in return for the employee’s service, the employer will pay the employee an agreed amount in a certain ... ownership, the law assumes that the employment contract is made freely between two equal parties: in this case the employee and employer For the former, the contract of employment is es sentially ... terms; the things that the parties agree to from the outset, such as wages and holidays The UK Employ ment Rights Act of 1996 stipulates that an employer should provide these terms in writing to the...
Ngày tải lên: 21/06/2014, 08:20
The Key Concepts Routledge Key Guides by Chris Rowley and Keith Jackson_2 docx
... make it possible to achieve the plan The CEO then follows up on each suggestion and either makes the change or informs the employee why the change is not feasible Other processes of psychic rewards ... In some cases, money is a part of the reward, but the emphasis is on the rec ognition received by the employee rather than the nominal amount of money involved The earliest non- onetary rewards ... presence at the worksite The rationale behind worksite policies is that employees spend so much time at work that it is appropriate to reward them for this by making the workplace a pleasant place...
Ngày tải lên: 21/06/2014, 08:20