Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task 1 : List the owner number, the owner's first name as FIRST and the owner's last name as LAST for all owners. The first

Task 1: List the owner number, the owner's first name as FIRST and the owner's last name as LAST for all owners. The first name should appear in uppercase letters and the last name should appear in lowercase letters.
Task 2: List the owner number and last name for all owners located in the city of Seattle. Your query should ignore case. For example, a customer with the city Seattle should be included, as should customers whose city is SEATTLE, SEAttle, SeAttle, and so on.
Task 3: StayWell is offering a monthly discount for residents who pay their rent on a quarterly basis. The discount is 1.75 percent of the monthly fee. For each property, list the office number, address, owner number, owners last name, monthly rent, and discount as DISCOUNT. The discount should be rounded to the nearest dollar.
Task 4: Create the DISPLAY_OWNER procedure which obtains the first name and last name of the owner whose number currently is stored in I_OWNER_NUM (provided as a parameter). Place these values in the variables I_FIRST_NAME and I_LAST_NAME. Output the contents of I_OWNER_NUM, I_FIRST_NAME, and I_LAST_NAME.
Task 5: Create the DISPLAY_PROPERTY_OWNER procedure which obtains the office location number, address, owner number, owner first name, and owner last name for the property whose property ID is currently stored in I_PROPERTY_ID (provided as a parameter).
Place these values in the variables I_LOCATION_NUM, I_ADDRESS, I_OWNER_NUM, I_FIRST_NAME, and I_LAST_NAME, respectively. Output the contents of I_LOCATION_NUM, I_ADDRESS, I_OWNER_NUM, I_FIRST_NAME, and I_LAST_NAME.
Task 6: Add the following record to the OWNER table:
INSERT INTO OWNER VALUES('SA100', 'Sam', 'Afyouni', '100 Hello St', 'Anytown', 'MA','55555');
Task 7: Create the UPD_OWNER_LAST_NAMEprocedure to change the last name of the owner whose number is stored in I_OWNER_NUM (provided as a parameter) to the value currently found in I_LAST_NAME.
Task 8: Create the DEL_OWNER procedure to delete the owner whose number is stored in I_OWNER_NUM (provided as a parameter).
Task 9: Create the DISP_PROPERTYS procedure to retrieve and output the office number, address, monthly rent, and owner number for every property whose square footage is equal to the square footage stored in I_SQR_FT (provided as a parameter).
Store these values in I_LOCATION_NUM, I_ADDRESS, I_MONTHLY_RENT, and I_OWNER_NUM and display them when the procedure is called. From the textbook, A Guide to SQL 10th Edition (hope you can read the lists in the photo)
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Visual Basic6 Database Programming

Authors: John W. Fronckowiak, David J. Helda

1st Edition

0764532545, 978-0764532542

More Books

Students also viewed these Databases questions

Question

2. Document data as evidence in complete and detailed notes

Answered: 1 week ago

Question

b. Explain how you initially felt about the communication.

Answered: 1 week ago

Question

3. Identify the methods used within each of the three approaches.

Answered: 1 week ago

Question

a. When did your ancestors come to the United States?

Answered: 1 week ago