Quote Originally Posted by LKBrwn_DBA

Look into using the CASE statement.

I dont think i can use a case statement the directions said i had to use a cursor for loop using PL/SQL blocking structure.

This is what the directions say

As business is becoming strong and the movie stock is growing for the More Movie Rentals, the manager wants to do more inventory evaluations. One item of interest concerns any movie for which the company is holding $75 or more in value. The manager wants to focus on these movies in regards to their revenue generation to ensure the stock level is warranted. To make these stock queries more efficient, the application team decides that a column should be added to the MM_MOVIE table named STK_FLAG that will hold a value '*' if stock is $75 or more. Otherwise the value should be NULL. Add the needed column and create an anonymous block that contains a CURSOR FOR loop to accomplish the task. The company will run this program monthly to update the STK_FLAG column before the inventory evaluations.

Make sure that you display the table structure of MM_MOVIE using DESC, and SELECT all data from this table before and after you do this exercise to show the effect of your block. Submit all code and Oracle responses, but please edit it to remove erroneous attempts.


I already created the stk_flag column and multiplied the values, im just unsure how to do that cursor for loop to do the checks for numbers