PL/SQL Chapter 7 Solutions
Review Questions
1. B
2. D
3. A,D
4. C,D
5. B,D
6. A
7. C
8. D
9. A
10. D
11. The user_objects view can be used to determine all the packages that exist in the database. In the query, use a WHERE clause to select the rows that contain the term 'PACKAGE' in the object type column. Selecting the text column of the user_source view will list all the source code lines in the package. Use a WHERE clause on the name column to select a single package.
12. If there are values referenced continually in the application, storing them in packaged variables will allow the values to only be retrieved once thus saving data retrieval processing. The values in global constructs are persistent for the entire user session.
…show more content…
END;
/
SELECT order_info_pkg.ship_name_pf(idBasket) FROM bb_basket WHERE idBasket = 12;
Assignment 7-3
CREATE OR REPLACE PACKAGE order_info_pkg IS PROCEDURE basket_info_pp (p_basket IN NUMBER, p_shop OUT NUMBER, p_date OUT DATE, p_name OUT VARCHAR2);
END;
/
CREATE OR REPLACE PACKAGE BODY order_info_pkg IS FUNCTION ship_name_pf (p_basket IN NUMBER) RETURN VARCHAR2 IS lv_name_txt VARCHAR2(25); BEGIN SELECT shipfirstname||' '||shiplastname INTO lv_name_txt FROM bb_basket WHERE idBasket = p_basket; RETURN lv_name_txt; EXCEPTION WHEN NO_DATA_FOUND THEN DBMS_OUTPUT.PUT_LINE('Invalid basket id'); END ship_name_pf; PROCEDURE basket_info_pp (p_basket IN NUMBER, p_shop OUT NUMBER, p_date OUT DATE, p_name OUT VARCHAR2 ) IS BEGIN SELECT idshopper, dtordered INTO p_shop, p_date FROM bb_basket WHERE idbasket = p_basket; p_name := ship_name_pf(p_basket); EXCEPTION WHEN NO_DATA_FOUND THEN DBMS_OUTPUT.PUT_LINE('Invalid basket id'); END basket_info_pp;
END;
/
SET SERVEROUTPUT ON
DECLARE
lv_name_txt VARCHAR2(20); lv_id_num NUMBER(4); lv_ord_dat DATE;
BEGIN
order_info_pkg.basket_info_pp(12,lv_id_num, lv_ord_dat, lv_name_txt); DBMS_OUTPUT.PUT_LINE(lv_name_txt); DBMS_OUTPUT.PUT_LINE(lv_id_num); DBMS_OUTPUT.PUT_LINE(lv_ord_dat);
END;
/
Assignment 7-4
CREATE OR REPLACE PACKAGE login_pkg IS pv_id_num NUMBER(3); pv_zip3_num NUMBER(3); FUNCTION login_ck_pf (p_user IN VARCHAR2, p_pass
Polysar Limited is Canada’s largest chemical company. It is structured into 3 groups, namely, basic petrochemicals, rubber, and diversified products. Rubber Group is the largest of the three operating units of Polysar Limited. The primary users of its products, such as butyl and halobutyl, are manufacturers of automobile tires; other users are from various industries. In 1986, Rubber group contributed 0.8 billion which is 46 percent of the company annual sale. The operation of the group is divided into four divisions, NASA (North America and South America) and EROW (Europe and rest of the world), Research department and Global Marketing department. NASA and EROW operate as profit centers each produce butyl and halobutyl
Plans would be reviewed and updated at regular intervals to check progress and consider any changes in the situation.
In 1900, the death rate per 100,000 population for influenza and pneumonia (I & P) was 202.2; it was 22.4 in 2003. How much did the death rate due to I & P decline
Within this bid include materials that will be used during this project. Provide a list and description of similar project experience on baseball fields, turf, club house, parking lots and landscape, drainage/utility designs for the general contractor that demonstrates the qualifications for this project.
-3 x 1.66 pts. = minus 5 pts. = 45 pts. out of 50 pts. = 90%
As a future educator, it will be my job to continue acknowledging, valuing and teaching Indigenous origins, histories and cultures using the Australian Institute for Teaching and School (AITSL) standard 2.4 and the Australian Curriculum. This will give my future students a better understanding that Aboriginal and Torres Strait Islander people were the first custodians of our Australian land and of their origins. They lived in Australia 60,000 years before the British settled in 1788. I will teach an Australian historical time line prior to 1788.
1. Ernestine Friedl says that the position of women is higher the more they are involved in (l) primary subsistence (as owners or controllers, NOT merely as laborers) and (2) the PUBLIC distribution of the product of subsistence. Use this argument to account for the position of women in Kung society. Make sure you use both part (l) and part (2) of Friedl’s argument. (Don’t worry that Friedl’s argument is simplistic; she is not trying to say that women’s role in subsistence is the ONLY factor that affects their position in society.)
1. (TCO B) Identify four categories of measures that might constitute a Balanced Scorecard of performance measures and provide an example of each. Also explain how a Balanced Scorecard could assist your organization. This answer must be in your own words—significant cut and paste from the text or other sources is not acceptable. (Points : 30)
We are living in market society, which is so different from previous societies. In market society, the whole of society is a system of self-regulating market (Polanyi 43). In order to make the market society function, people need to think and act in certain ways(Polanyi 68). For example, people in market society think that economic relations are much more important than interpersonal relations (Polanyi 44). Polanyi calls the emergence of market society “the great transformation”. My thesis statement is that the shift to market society is a
1. You recently retired from government contracting work and established a consulting company (fully consistent with government ethics laws and rules, of course) with the primary focus of advising potential government contractors and subcontractors. Mr. Johnny Jones, of The Johnny Jones Flooring and Construction Company has approached you with a question. Jones and his company are potential subcontractors (they, obviously, specialize in flooring) on a federal construction contract worth a little over two million dollars ($ 2,000,000.00) recently awarded to the Jimmy Smith Construction Company (Jimmy Smith, the prime contractor). Neither Johnny nor his company have ever been part of a government contract
In chapter 6 section 1 it talks about the creation of the PLS system. As a new nation was created there had to be a system put in place in order to keep from arguments erupting over land, this system was created by a committee led by Thomas Jefferson in 1784. This system although having some weaknesses is still used today to divide land. There are two main systems used in the United States these are the metes and bounds and the GLO system. 6.2
Jane thinks she will be taking ten months’ maternity leave after the birth of their child. Her employer’s maternity package is full pay for the first six months, and then on the statutory maternity pay, worth about £94 net per week, for the further four months. They looked into Adan taking some paternity leave but have decided against it, and
1. (10 pts.) Discuss how organizational architecture and corporate culture are related. Use an example of a real-life firm and discuss how its corporate culture blends with its organizational architecture.
1) You can call the module several times instead of writing it out each time.
Ascendants to the Great Seat of Cymurri had for a long time imported their Oracles solely from the Ivory Incubarium, high in the empty pinnacles of the Zealot's Range, with an up front installment set aside a few minutes of the fetus' origination and the adjust surrendered on conveyance of a develop, all around prepared prophet to the Gate of the Graven King.