Consider the following PL/SQL code querying HR database for computing incentive for a given employee: DECLARE...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the following PL/SQL code querying HR database for computing incentive for a given employee: DECLARE incentive v_last_name BEGIN ; END; ; SELECT salary 0.12, last_name INTO incentive, v_lastname FROM employees WHERE employee_id = 110; DBMS_OUTPUT.PUT_LINE('Incentive = ' || TO_CHAR(incentive)); Answer the following using appropriate PL/SQL statements. a) What should be the data type of variables 'incentive' and 'v_last_name' for above code to execute successfully? [2 marks] b) Modify the code to handle the exception by printing " No employee <employee id> exists in the database" in case no rows with employee id=110 exist in the table. Consider the following PL/SQL code querying HR database for computing incentive for a given employee: DECLARE incentive v_last_name BEGIN ; END; ; SELECT salary 0.12, last_name INTO incentive, v_lastname FROM employees WHERE employee_id = 110; DBMS_OUTPUT.PUT_LINE('Incentive = ' || TO_CHAR(incentive)); Answer the following using appropriate PL/SQL statements. a) What should be the data type of variables 'incentive' and 'v_last_name' for above code to execute successfully? [2 marks] b) Modify the code to handle the exception by printing " No employee <employee id> exists in the database" in case no rows with employee id=110 exist in the table.
Expert Answer:
Answer rating: 100% (QA)
a What should be the data type of variables incentive and vlastname for above code to execute succes... View the full answer
Related Book For
Posted Date:
Students also viewed these databases questions
-
If the amount of retained earnings at the beginning of the year was $ 3 0 , 0 0 0 , and $ 1 2 , 0 0 0 in dividends is paid during the year, calculate net income for the year.
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
Managing Scope Changes Case Study Scope changes on a project can occur regardless of how well the project is planned or executed. Scope changes can be the result of something that was omitted during...
-
For the spherical coordinate system (R, , ) in Fig. 1.6, show that: Fig 1.6 X @3 0 Ex R e2 en ee X2
-
Convert the absorbing stochastic matrix to standard form? 1. 2. 3. 4. B C .51 3 1 cL5 0 .1 A B
-
The following are the trial balance and the other information related to Yorkis Perez, a consulting engineer. 1. Fees received in advance from clients $6,000. 2. Services performed for clients that...
-
What three actions can a company take to protect itself against being charged with social media discrimination?
-
Sam, age 35, and Kathy, age 33, are married and have a son, age 1. Sam is employed as an accountant and earns $75,000 annually. Kathy is professor of finance at a large state university and earns...
-
Prepare entries for the transactions below under the method that records prepaid expenses as expenses and records unearned revenues as revenues. Also, define the adjusting entries at the end of the...
-
A cancer specialist from the Los Angeles County General Hospital (LACGH) rated patient optimism in 20 to 40 year old patients with incurable cancer in 1970. In 1990, the researcher examined hospital...
-
Give examples of "small" explosions that have useful purposes, particulary explosions that the average person doesnt even realize are explosions. Please give evidence (citation) to support your...
-
Perceiving your communication as effective while those around you perceive it as ineffective is known as ______________.
-
_____________ are exchanges of messages about a topic using email and other professional electronic tools to encourage participation that will ideally lead to new ideas, strategic planning, and sound...
-
A(n) _____________ provides a picture of who you are as an employee by highlighting your skill set.
-
_____________ is the study of time as communication and/or as a communication function.
-
___________ refers to how people use their voices to communicate and express themselves.
-
J&J Enterprises wants to issue sixty 20-year, $1,000 zero-coupon bonds. If each bond is to yield 7%, how much will J&J receive (ignoring issuance costs) when the bonds are first sold? A) $11,212 B)...
-
Big Jim Company sponsored a picnic for employees and purchased a propane grill equipped with a standard-sized propane tank for the picnic. To make sure there was enough propane for all the cooking...
-
Choose a labour organization or federation, such as a labour council or provincial or centralized labour federation, in your region of the country. Describe how that organization is structured,...
-
Explain why a union would take a strike vote when it had no immediate intention of actually going on strike.
-
Distinguish between industrial relations and human resource management.
-
In an audit of a corporation that has a bond issue outstanding, the trust indenture is reviewed and confirmation as to the issue is obtained from the trustee. List eight matters of importance to the...
-
Robertson Company had accounts receivable of \(\$ 200,000\) at December 31, 200X, and had provided an allowance for uncollectible accounts of \(\$ 6,000\). After performing all normal auditing...
-
Tom Jones, CPA, is auditing the financial statements of a manufacturing company with a significant amount of trade accounts receivable. Jones is satisfied that the accounts are properly summarized...
Study smarter with the SolutionInn App