1 answer

Oracle SQL Many of the pages in Brewbean’s needs to display the product type as coffee...

Question:

Oracle SQL

Many of the pages in Brewbean’s needs to display the product type as coffee or equipment. Type value for these product categories is a ‘C’ or ‘E’. Create a procedure that accepts the type C or E and returns the full description as ‘Coffee’ or ‘Equipment’. Use only 1 parameter in the procedure for this task.


Answers

//User input program:

//use oracle11g express software for execution

DECLARE
product char; //one parameter
BEGIN
DBMS_OUTPUT.PUT_LINE('Enter product type C or E');
product=:&product;
if(product ='C') then
DBMS_OUTPUT.PUT_LINE('Coffee');
elsif(product ='E') then
DBMS_OUTPUT.PUT_LINE('Equipment');
else
DBMS_OUTPUT.PUT_LINE('Enter valid key C or E only');
end if;
END;
/

------------------------------------------------------------------------------------------------------------------------------------------------------------

//Default values program:

DECLARE
product char:='C';
BEGIN
if(product ='C') then
DBMS_OUTPUT.PUT_LINE('Coffee');
elsif(product ='E') then
DBMS_OUTPUT.PUT_LINE('Equipment');
else
DBMS_OUTPUT.PUT_LINE('Enter valid key C or E only');
end if;
END;
/

.

Similar Solved Questions

1 answer
A. Joe, a 42-year-old woodwind musician with the symphony orchestra, is started on a gener dingiersay-Converting...
A. Joe, a 42-year-old woodwind musician with the symphony orchestra, is started on a gener dingiersay-Converting enzyme (ACE) inhibitor for his newly diagnosed hypertension. He returns to the clinic the following week and demonstrates that his original blood pressure of 150/90 mm Hg has improved to ...
1 answer
ESSAY 51. What are some of the challenges researchers have faced in gathering data when they...
ESSAY 51. What are some of the challenges researchers have faced in gathering data when they study teenage sexual behavior?...
1 answer
Admitting New Partners Who Buy an Interest and Contribute Assets The capital accounts of Trent Henry...
Admitting New Partners Who Buy an Interest and Contribute Assets The capital accounts of Trent Henry and Tim Chou have balances of $188,500 and $135,600, respectively. LeAnne Gilbert and Becky Clarke are to be admitted to the partnership. Gilbert buys one-fifth of Henry's interest for $43,400 an...
1 answer
Knowing that a beam of the cross section shown is bent about a horizontal axis and...
Knowing that a beam of the cross section shown is bent about a horizontal axis and that the bending moment is 5.5 kN.m, determine the total force acting on the top flange. 15 mm -- 15 mm 45 mm 15 mm --- 75 mm-- The total force acting on the top flange is O K N....
1 answer
Ning is suggested by Match the Meaning Synony toward the river For coch item below. choose...
ning is suggested by Match the Meaning Synony toward the river For coch item below. choose the word whose meaning is sugges the clue given. Then write the word in the space provided. d. haul For each it meaning on the lir 1. A forest fire made the frightened herd a demonstrate be stampede c. pledge ...
1 answer
3. A player has $2.They bet 1 at a tive and win 1 wrth probobility p .The player stops playing wt...
3. A player has $2.They bet 1 at a tive and win 1 wrth probobility p .The player stops playing wten tey lose $2,or win 4.Whct is the probabil ty te (a)ployer loses their maney at he end ot tre plays? (b) gare lasts rore than saer plays Hint: PO 0, 0,1,0, 0, o, o 2 3. A player has $2.They bet 1 at a...
1 answer
Plants photosynthesize and both plants and animals have cellular respiration Question 7 XXX What are the...
plants photosynthesize and both plants and animals have cellular respiration Question 7 XXX What are the products of cell respiration? RO EROS 3909033 Water (H2O) and Carbon Dioxide (CO2) Oxygen (O2) and Glucose (C6H1206) Oxygen (O2) and Carbon Dioxide (CO2) Water (H2O) and Glucose (C6H1206)...
1 answer
If T is a kinetic energy, p is the length of a momentum vector and v...
If T is a kinetic energy, p is the length of a momentum vector and v is the length of a velocity vector of a particle with mass m show that:...
1 answer
What is a Real Estate Investment Trust (REIT)? syndicate of working real estate professionals syndicate of...
What is a Real Estate Investment Trust (REIT)? syndicate of working real estate professionals syndicate of people looking for their first home An unincorporated trust that holds a large number of real estate investments A syndicate of a few investors with large sums of investment capital 6...
1 answer
3) Use the standard entropy tables to determine AS for the following reactions. Give a reason...
3) Use the standard entropy tables to determine AS for the following reactions. Give a reason why the value of AS would be expected to have this sign (a) Ca(OH)2(s) → Cao(s) + H2O(g) (b) 2 Na(s) + 2 H2O(1) ► 2 NaOH(s) + H2(g) (c) N2(g) + 3 H2(g) → 2 NH3(g)...
1 answer
Free fall
A ball is thrown vertically upward witha speed of 23.1 m/s from a height of 2.1m.a) How long does it take to reach itshighest point?b) How long does the ball taketo hit the ground after it reaches its highestpoint?idk what kinematics equationsto use....
1 answer
(1 point) Consider the function f(x) = -22% + 36x? - 162x + 10. This function...
(1 point) Consider the function f(x) = -22% + 36x? - 162x + 10. This function has two critical numbers A <B: А 3 and B 9 f"(A) 36 f"(B) = -36 Thus f(x) has a local -206 and a local 10 at A (type in MAX or MIN) at B (type in MAX or MIN)....
1 answer
Austin General Hospital is evaluating new lab equip ment. The interest rate is 12% and in...
Austin General Hospital is evaluating new lab equip ment. The interest rate is 12% and in each case the equipment's useful life is 5 years. Use NPW analysis to pick which company you should purchase from. 5-64 Company $13,500 $20,000 $15,000 1,500 1,800 1,100 Annual benefit 9,500 11,000 9,000 Sa...
1 answer
Given two dependent random samples with the following results: Population 1 77 65 62 80 76...
Given two dependent random samples with the following results: Population 1 77 65 62 80 76 59 71 74 Population 2 79 56 | 71 72 79 63 | 68 80 Can it be concluded, from this data, that there is a significant difference between the two population means? Let d = (Population 1 entry)–(Population 2 ...
1 answer
Consider the following equations. 3 A + 6 B → 3 D, ΔH = -440. kJ/mol...
Consider the following equations. 3 A + 6 B → 3 D, ΔH = -440. kJ/mol E + 2 F → A, ΔH = -102.5 kJ/mol C → E + 3 D, ΔH = +64.5 kJ/mol Suppose the first equation is reversed and multiplied by 1/6, the second and third equations are divided by 2, and the three adjusted...
1 answer
EESEEEEEEEEEEEEEEEEE 1) TRUE/False a) The income tax rates are the same for capital gains and depreciation...
EESEEEEEEEEEEEEEEEEE 1) TRUE/False a) The income tax rates are the same for capital gains and depreciation recapture of an asset T/F b) Depletion can be calculated in two different approach: Depletion allowance or percentage depletion / c) In Straight Line depreciation, the book value is zero at the...
1 answer
What might be an impediment in changing from a traditionally based costing system to an activity-based...
What might be an impediment in changing from a traditionally based costing system to an activity-based costing system? Management may not be in favour of a change. Excessive costs may be incurred to assist in capturing costs. Some costs would still have to be allocated arbitr...
1 answer
What impact does a rigid chain of command have on organizational culture?
What impact does a rigid chain of command have on organizational culture?...
1 answer
De Broglie wave Application
De Broglie wave Application...